new graphics code compiles... no, it doesn't work yet
FILE(GLOB SOURCE_FILES "*.cc" "Network/*.cc")
FILE(GLOB HEADER_FILES "*.hh" "Network/*.hh")
set_source_files_properties("version.c" PROPERTIES GENERATED true)
# Generate config.h
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
# main module
set (CORE_CLANLIB_COMPONENTS Core App Signals)
set (CORE_SOURCES ${SOURCE_FILES} ${HEADER_FILES})
# Graphics module
add_subdirectory(Graphics)
# Libraries
set (CLANLIB_VERSION 0.8)
set (CLANLIB_COMPONENTS ${CORE_CLANLIB_COMPONENTS} ${GRAPHICS_CLANLIB_COMPONENTS})
# ClanLib 0.8
message (STATUS "Finding ClanLib version=${CLANLIB_VERSION}, components=${CLANLIB_COMPONENTS}" )
find_package(ClanLib ${CLANLIB_VERSION} REQUIRED COMPONENTS ${CLANLIB_COMPONENTS})
include_directories(${ClanLib_INCLUDE_DIRS})
# build list of libs/source files
set(LIBS ${LIBS} ${ClanLib_LIBRARIES})
set(SOURCES ${CORE_SOURCES} ${GRAPHICS_SOURCES} "version.c")
# Assumes the project generates only one executable. If you need more, you'll need to alter
# the script and replace ${PROJECT_SHORT_NAME} by executable name.
add_executable("${PROJECT_SHORT_NAME}" ${SOURCES})
target_link_libraries("${PROJECT_SHORT_NAME}" ${LIBS})
install(TARGETS "${PROJECT_SHORT_NAME}" DESTINATION bin)