CMakeLists.txt 801 B

123456789101112131415161718192021222324252627282930
  1. if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
  2. message(FATAL_ERROR "Please create a separate directory for build files.")
  3. endif()
  4. cmake_minimum_required(VERSION 2.8.7)
  5. set(CMAKE_CXX_STANDARD 11)
  6. project(gsd C CXX)
  7. set(CMAKE_BUILD_TYPE Debug)
  8. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
  9. add_compile_options(-DRELEASE)
  10. # --[ Options
  11. option(build_modules "build modules" ON)
  12. option(build_source "build source programs" ON)
  13. option(build_plugins "build plugins programs" ON)
  14. add_subdirectory(framework)
  15. if(build_modules)
  16. add_subdirectory(modules)
  17. endif()
  18. if(build_plugins)
  19. add_subdirectory(plugins)
  20. endif()
  21. if(build_source)
  22. add_subdirectory(source)
  23. endif()
  24. # ---[ install
  25. set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") #set runtime path