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.
28 lines
1.3 KiB
28 lines
1.3 KiB
string(REPLACE " " ";" CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS})
|
|
if(CMAKE_BUILD_TYPE MATCHES DEBUG)
|
|
list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_DEBUG})
|
|
else()
|
|
list(APPEND CMAKE_CXX_FLAGS_AS_LIST ${CMAKE_CXX_FLAGS_RELEASE})
|
|
endif()
|
|
set(CPPTEMPLATE_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate)
|
|
ExternalProject_Add(
|
|
cpptemplate
|
|
DOWNLOAD_COMMAND ""
|
|
SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate
|
|
PREFIX ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate
|
|
CONFIGURE_COMMAND ""
|
|
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}
|
|
BUILD_ALWAYS 1
|
|
INSTALL_COMMAND ""
|
|
BUILD_IN_SOURCE 0
|
|
LOG_BUILD ON
|
|
BUILD_BYPRODUCTS ${CPPTEMPLATE_LIB_DIR}/cpptemplate${DYNAMIC_EXT} ${CPPTEMPLATE_LIB_DIR}/cpptemplate${STATIC_EXT}
|
|
)
|
|
|
|
set(CPPTEMPLATE_INCLUDE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cpptemplate)
|
|
set(CPPTEMPLATE_STATIC_LIBRARY ${STORM_3RDPARTY_BINARY_DIR}/cpptemplate/cpptemplate${STATIC_EXT})
|
|
list(APPEND STORM_LINK_LIBRARIES ${CPPTEMPLATE_STATIC_LIBRARY})
|
|
add_dependencies(resources cpptemplate)
|
|
|
|
message(STATUS "Storm - Linking with cpptemplate.")
|
|
include_directories(${CPPTEMPLATE_INCLUDE_DIR})
|