Browse Source

added another target that copies over (needed) resource headers

tempestpy_adaptions
dehnert 8 years ago
parent
commit
5150497e95
  1. 11
      resources/3rdparty/CMakeLists.txt
  2. 7
      src/storm/CMakeLists.txt

11
resources/3rdparty/CMakeLists.txt

@ -103,6 +103,15 @@ include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/exprtk")
message (STATUS "Storm - Including Sparsepp.") message (STATUS "Storm - Including Sparsepp.")
include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/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 ## ModernJSON
@ -596,3 +605,5 @@ if(ENABLE_CUDA)
list(APPEND STORM_LINK_LIBRARIES ${STORM_CUDA_LIB_NAME}) list(APPEND STORM_LINK_LIBRARIES ${STORM_CUDA_LIB_NAME})
include_directories("${PROJECT_SOURCE_DIR}/cuda/kernels/") include_directories("${PROJECT_SOURCE_DIR}/cuda/kernels/")
endif() 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)

7
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 target_link_libraries(storm-gspn-main storm) # Adding headers for xcode
set_target_properties(storm-gspn-main PROPERTIES OUTPUT_NAME "storm-gspn") 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}) foreach(HEADER ${STORM_LIB_HEADERS})
string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER}) string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER})
string(REGEX MATCH "(.*)[/\\]" RELATIVE_DIRECTORY ${RELATIVE_HEADER_PATH}) 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}") list(APPEND STORM_OUTPUT_HEADERS "${CMAKE_BINARY_DIR}/include/${RELATIVE_DIRECTORY}${HEADER_FILENAME}")
endforeach() 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)
Loading…
Cancel
Save