From 5150497e95320488a56c1365367404fe9ae3675b Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 18 Nov 2016 16:41:22 +0100 Subject: [PATCH] added another target that copies over (needed) resource headers --- resources/3rdparty/CMakeLists.txt | 11 +++++++++++ src/storm/CMakeLists.txt | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index 7e90cd84a..7f9faa2ad 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -103,6 +103,15 @@ include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/exprtk") message (STATUS "Storm - Including Sparsepp.") include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp") +# Add sparsepp.h to the headers that are copied to the include directory in thebuild directory. +add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp + COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/sparsepp.h ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h + DEPENDS ${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/sparsepp.h +) +list(APPEND STORM_RESOURCES_HEADERS "${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h") + ############################################################# ## ## ModernJSON @@ -596,3 +605,5 @@ if(ENABLE_CUDA) list(APPEND STORM_LINK_LIBRARIES ${STORM_CUDA_LIB_NAME}) include_directories("${PROJECT_SOURCE_DIR}/cuda/kernels/") endif() + +add_custom_target(copy_resources_headers DEPENDS ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h) diff --git a/src/storm/CMakeLists.txt b/src/storm/CMakeLists.txt index 9062e60ce..27dcb0913 100644 --- a/src/storm/CMakeLists.txt +++ b/src/storm/CMakeLists.txt @@ -59,7 +59,7 @@ add_executable(storm-gspn-main ${STORM_GSPN_MAIN_SOURCES} ${STORM_MAIN_HEADERS}) target_link_libraries(storm-gspn-main storm) # Adding headers for xcode set_target_properties(storm-gspn-main PROPERTIES OUTPUT_NAME "storm-gspn") -# Install headers to include directory. +# Install storm headers to include directory. foreach(HEADER ${STORM_LIB_HEADERS}) string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER}) string(REGEX MATCH "(.*)[/\\]" RELATIVE_DIRECTORY ${RELATIVE_HEADER_PATH}) @@ -72,6 +72,7 @@ foreach(HEADER ${STORM_LIB_HEADERS}) ) list(APPEND STORM_OUTPUT_HEADERS "${CMAKE_BINARY_DIR}/include/${RELATIVE_DIRECTORY}${HEADER_FILENAME}") endforeach() -add_custom_target(copy_headers DEPENDS ${STORM_OUTPUT_HEADERS} ${STORM_LIB_HEADERS}) -add_dependencies(storm copy_headers) +add_custom_target(copy_storm_headers DEPENDS ${STORM_OUTPUT_HEADERS} ${STORM_LIB_HEADERS}) +add_dependencies(storm copy_storm_headers) +add_dependencies(storm copy_resources_headers)