Changeset 185 in pacpusframework for trunk/CMakeLists.txt
- Timestamp:
- 10/23/13 10:32:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r175 r185 12 12 13 13 if(POLICY CMP0020) 14 cmake_policy(SET CMP0020 14 cmake_policy(SET CMP0020 NEW) # for QT5.1 on windows / not work on linux 15 15 endif() 16 16 17 # ========================================17 ################################################################################ 18 18 # Pacpus version 19 # ======================================== 20 set(PACPUS_MAJOR_VERSION 0) 21 set(PACPUS_MINOR_VERSION 1) 22 set(PACPUS_PATCH_VERSION 0) 23 set(PACPUS_VERSION 24 "${PACPUS_MAJOR_VERSION}.${PACPUS_MINOR_VERSION}.${PACPUS_PATCH_VERSION}") 19 set(${PROJECT_NAME}_MAJOR_VERSION 0) 20 set(${PROJECT_NAME}_MINOR_VERSION 1) 21 set(${PROJECT_NAME}_PATCH_VERSION 0) 22 set(${PROJECT_NAME}_VERSION 23 "${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_VERSION}") 25 24 26 # ========================================25 ################################################################################ 27 26 # CMake variables 28 # ========================================29 27 set(PACPUS_ROOT_DIR ${CMAKE_SOURCE_DIR}) 30 28 set(PACPUS_3RD_PARTY_DIR ${PACPUS_ROOT_DIR}/3rd) 31 29 set(PACPUS_CMAKE_DIR ${PACPUS_ROOT_DIR}/cmake) 32 30 set(PACPUS_DOC_DIR ${PACPUS_ROOT_DIR}/doc) 31 set(PACPUS_EXAMPLES_DIR ${PACPUS_ROOT_DIR}/examples) 33 32 set(PACPUS_INCLUDE_DIR ${PACPUS_ROOT_DIR}/include/) 34 33 set(PACPUS_SCRIPTS_DIR ${PACPUS_ROOT_DIR}/scripts) … … 36 35 set(IS_BUILDING_PACPUS TRUE) 37 36 38 # ========================================37 ################################################################################ 39 38 # Configure CMake 40 # ========================================41 39 list(APPEND CMAKE_MODULE_PATH ${PACPUS_CMAKE_DIR}) 42 40 43 # ========================================41 ################################################################################ 44 42 # Import some functions 45 # ========================================46 43 include(${PACPUS_CMAKE_DIR}/PacpusUtilities.cmake) 47 44 48 # ========================================45 ################################################################################ 49 46 # Configure Pacpus 50 # ========================================51 47 include(${PACPUS_CMAKE_DIR}/PacpusConfiguration.cmake) 52 48 53 # ========================================49 ################################################################################ 54 50 # Find dependencies 55 # ========================================56 51 include(${PACPUS_CMAKE_DIR}/PacpusDependencies.cmake) 57 52 58 # ========================================53 ################################################################################ 59 54 # Handle platform-specific behaviour 60 # ========================================61 55 include(${PACPUS_CMAKE_DIR}/PacpusPlatforms.cmake) 62 56 63 # ========================================57 ################################################################################ 64 58 # Compiler flags coming from PacpusDependencies and PacpusPlatforms 65 # ========================================66 59 #message(STATUS "\${PACPUS_DEFINITIONS} = ${PACPUS_DEFINITIONS}") 67 60 add_definitions(${PACPUS_DEFINITIONS}) 68 61 69 # ======================================== 70 # Pre-configuration of the compiler 71 # ======================================== 62 ################################################################################ 72 63 # Includes directories 73 64 include_directories( … … 76 67 ) 77 68 78 # ========================================69 ################################################################################ 79 70 # Build the Pacpus' modules 80 # ========================================81 71 add_subdirectory(${PACPUS_SOURCE_DIR}) 82 if(PACPUS_BUILD_EXAMPLES)83 add_subdirectory(examples)84 endif()85 72 86 # ======================================== 87 # Build the documentation if enabled 88 # ======================================== 73 ################################################################################ 74 # DOCUMENTATION 89 75 if(PACPUS_BUILD_DOC) 90 76 add_subdirectory(${PACPUS_DOC_DIR}) 91 77 endif() 92 78 93 # ========================================79 ################################################################################ 94 80 # Pacpus Installation 95 # ========================================96 81 include(${PACPUS_CMAKE_DIR}/PacpusInstall.cmake) 97 82 set(ENV{PACPUS_ROOT} ${PACPUS_INSTALL_DIR}) 98 83 99 # ======================================== 100 # Summary 101 # ======================================== 84 ################################################################################ 85 # EXAMPLES 86 if(PACPUS_BUILD_EXAMPLES) 87 add_subdirectory(${PACPUS_EXAMPLES_DIR}) 88 endif() 89 90 ################################################################################ 91 # SUMMARY 102 92 pacpus_info("") 103 93 pacpus_info("=====================================================================") 104 pacpus_info("Configuration for Pacpus ${ PACPUS_VERSION}")94 pacpus_info("Configuration for Pacpus ${${PROJECT_NAME}_VERSION}") 105 95 pacpus_info("=====================================================================") 106 96 pacpus_info("")
Note:
See TracChangeset
for help on using the changeset viewer.