CMAKE_MINIMUM_REQUIRED ( VERSION 2.6 ) PROJECT ( gcdcon ) SET ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/build/cmake ) SET ( EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR} ) FIND_PACKAGE ( Comm REQUIRED ) INCLUDE_DIRECTORIES ( ${Comm_INCLUDE_DIRS} ) LINK_DIRECTORIES ( ${Comm_LIBRARY_DIRS} ) SET( ALL_LIBRARIES ${ALL_LIBRARIES} comm m ) SET ( APP_VERSION_MAJOR 0 ) SET ( APP_VERSION_MINOR 1 ) SET ( APP_VERSION_PATCH 0 ) SET ( APP_VERSION_STRING "\"${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}\"" ) IF ( CMAKE_BUILD_TYPE ) STRING ( TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE ) ELSE ( CMAKE_BUILD_TYPE ) SET ( BUILD_TYPE "" ) ENDIF ( CMAKE_BUILD_TYPE ) IF ( NOT BUILD_TYPE STREQUAL "release" ) SET ( DEBUG 1 ) SET ( NDEBUG 0 ) ELSE ( NOT BUILD_TYPE STREQUAL "release" ) SET ( DEBUG 0 ) SET ( NDEBUG 1 ) ENDIF ( NOT BUILD_TYPE STREQUAL "release" ) CONFIGURE_FILE ( ${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_SOURCE_DIR}/src/config.h ) FILE ( WRITE ${CMAKE_SOURCE_DIR}/src/.gitignore ".gitignore\nconfig.h" ) INCLUDE_DIRECTORIES ( ${CMAKE_SOURCE_DIR}/src ) ADD_SUBDIRECTORY ( src )