You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.3 KiB

  1. string(REPLACE " " ";" CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS})
  2. if(CMAKE_BUILD_TYPE MATCHES DEBUG)
  3. list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_DEBUG})
  4. else()
  5. list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_RELEASE})
  6. endif()
  7. set(CPPTEMPLATE_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate)
  8. ExternalProject_Add(
  9. cpptemplate
  10. DOWNLOAD_COMMAND ""
  11. SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate
  12. PREFIX ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate
  13. CONFIGURE_COMMAND ""
  14. BUILD_COMMAND ${CMAKE_CXX_COMPILER} -c ${CMAKE_CXX_FLAGS_AS_LIST} ${CMAKE_CXX_FLAGS_RELEASE_AS_LIST} -fPIC -I${Boost_INCLUDE_DIRS} ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate/cpptempl.cpp -o ${CPPTEMPLATE_LIB_DIR}/cpptemplate${STATIC_EXT}
  15. INSTALL_COMMAND ""
  16. BUILD_IN_SOURCE 0
  17. LOG_BUILD ON
  18. BUILD_BYPRODUCTS ${CPPTEMPLATE_LIB_DIR}/cpptemplate${DYNAMIC_EXT} ${CPPTEMPLATE_LIB_DIR}/cpptemplate${STATIC_EXT}
  19. )
  20. set(CPPTEMPLATE_INCLUDE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate)
  21. set(CPPTEMPLATE_STATIC_LIBRARY ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate/cpptemplate${STATIC_EXT})
  22. list(APPEND STORM_LINK_LIBRARIES ${CPPTEMPLATE_STATIC_LIBRARY})
  23. add_dependencies(resources cpptemplate)
  24. message(STATUS "Storm - Linking with cpptemplate.")
  25. include_directories(${CPPTEMPLATE_INCLUDE_DIR})