CMakeLists.txt
changeset 374 1862c5f2cfc3
parent 5 617813994ab1
child 395 91d96387b359
equal deleted inserted replaced
373:2d36696d9121 374:1862c5f2cfc3
     1 set(PROJECT_SHORT_NAME "kg")
     1 set(PROJECT_SHORT_NAME "kg")
     2 set(PROJECT_LONG_NAME "Kisna Glista")
     2 set(PROJECT_LONG_NAME "Kisna Glista")
       
     3 
       
     4 # XXX: wrong
     3 set(PROJECT_VERSION_MAJOR 0)
     5 set(PROJECT_VERSION_MAJOR 0)
     4 set(PROJECT_VERSION_MINOR 1)
     6 set(PROJECT_VERSION_MINOR 1)
     5 
     7 
     6 project(${PROJECT_SHORT_NAME})
     8 project(${PROJECT_SHORT_NAME})
     7 cmake_minimum_required(VERSION 2.6)
     9 cmake_minimum_required(VERSION 2.6)
     8 
    10 
     9 # Avoid source tree pollution
    11 # Avoid source tree pollution
    10 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
    12 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
    11 	message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files already created:\nrm -rf CMakeCache.txt CMakeFiles")
    13 	message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files already created:\nrm -rf CMakeCache.txt CMakeFiles")
    12 endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
    14 endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
       
    15 
       
    16 # Where to find project source code (hh+cc)
       
    17 set(PROJECT_SOURCECODE_DIR "${CMAKE_SOURCE_DIR}/src")
       
    18 
       
    19 # Project version
       
    20 # XXX: hardcoded
       
    21 set(PROJECT_VERSION "0.1.0")
    13 
    22 
    14 # Where to install project data files
    23 # Where to install project data files
    15 set(PROJECT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_SHORT_NAME}")
    24 set(PROJECT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_SHORT_NAME}")
    16 
    25 
    17 # Where to look for Find*.cmake and other modules
    26 # Where to look for Find*.cmake and other modules
    23 	set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
    32 	set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
    24 endif(NOT CMAKE_BUILD_TYPE)
    33 endif(NOT CMAKE_BUILD_TYPE)
    25 
    34 
    26 add_subdirectory(src)
    35 add_subdirectory(src)
    27 add_subdirectory(data)
    36 add_subdirectory(data)
       
    37 add_subdirectory(doc)
    28 
    38