terom@6: FILE(GLOB SOURCE_FILES "*.cc") terom@6: FILE(GLOB HEADER_FILES "*.hh") terom@6: terom@6: set(SOURCES ${SOURCE_FILES} ${HEADER_FILES}) terom@6: terom@6: # Generate config.h terom@6: configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) terom@6: include_directories("${CMAKE_CURRENT_BINARY_DIR}") terom@6: terom@6: # Libraries terom@6: terom@6: # ClanLib 0.8 terom@6: find_package(ClanLib 0.8 REQUIRED COMPONENTS Core App Network) terom@6: include_directories(${ClanLib_INCLUDE_DIRS}) terom@6: set(LIBS ${LIBS} ${ClanLib_LIBRARIES}) terom@6: terom@6: # Assumes the project generates only one executable. If you need more, you'll need to alter terom@6: # the script and replace ${PROJECT_SHORT_NAME} by executable name. terom@8: add_executable("${PROJECT_SHORT_NAME}-p2" ${SOURCES}) terom@8: target_link_libraries("${PROJECT_SHORT_NAME}-p2" ${LIBS}) terom@8: install(TARGETS "${PROJECT_SHORT_NAME}-p2" DESTINATION bin) terom@6: terom@6: