12345678910111213141516171819202122232425262728293031323334 |
- if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
- message(FATAL_ERROR "Please create a separate directory for build files.")
- endif()
- cmake_minimum_required(VERSION 2.8.7)
- set(CMAKE_CXX_STANDARD 11)
- project(gsd C CXX)
- set(CMAKE_BUILD_TYPE Debug)
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
- add_compile_options(-DRELEASE)
- # --[ Options
- option(build_modules "build modules" ON)
- option(build_source "build source programs" ON)
- option(build_plugins "build plugins programs" ON)
- option(build_test "build test programs" ON)
- add_subdirectory(framework)
- if(build_modules)
- add_subdirectory(modules)
- endif()
- if(build_plugins)
- add_subdirectory(plugins)
- endif()
- if(build_source)
- add_subdirectory(source)
- endif()
- if(build_test)
- add_subdirectory(test)
- endif()
- # ---[ install
- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") #set runtime path
|