CMakeLists.txt 784 B

12345678910111213141516171819202122232425262728293031323334
  1. project(prometheus-cpp-lite)
  2. cmake_minimum_required(VERSION 3.2)
  3. option(PROMETHEUS_BUILD_EXAMPLES "Build with examples" OFF)
  4. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
  5. if(WIN32)
  6. # it prevent create Debug/ and Release folders in Visual Studio
  7. foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
  8. string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
  9. set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${PROJECT_SOURCE_DIR}/bin )
  10. endforeach()
  11. set (INSTALL_PATH_BIN "${PROJECT_SOURCE_DIR}/installed/bin/")
  12. else() # not WIN32
  13. set (INSTALL_PATH_BIN "bin/")
  14. endif()
  15. add_subdirectory("./core")
  16. add_subdirectory("./simpleapi")
  17. add_subdirectory("./3rdpatry/http-client-lite")
  18. if(PROMETHEUS_BUILD_EXAMPLES)
  19. add_subdirectory("./examples")
  20. endif()