diff --git a/CMakeLists.txt b/CMakeLists.txt index 7170ecaac..5f5fcdb72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -528,12 +528,14 @@ ExternalProject_Add( SOURCE_DIR "${STORM_SYLVAN_ROOT}" CMAKE_ARGS -DSYLVAN_BUILD_TEST=Off -DSYLVAN_BUILD_EXAMPLES=Off -DCMAKE_BUILD_TYPE=Release BINARY_DIR "${PROJECT_BINARY_DIR}/sylvan" + INSTALL_COMMAND "" INSTALL_DIR "${PROJECT_BINARY_DIR}/sylvan" ) +ExternalProject_Get_Property(sylvan binary_dir) set(Sylvan_INCLUDE_DIR "${STORM_SYLVAN_ROOT}/src") message(STATUS "Linking with shipped version of sylvan (in directory ${STORM_SYLVAN_ROOT}).") include_directories("${Sylvan_INCLUDE_DIR}") -list(APPEND STORM_LINK_LIBRARIES "${PROJECT_BINARY_DIR}/sylvan/src/libsylvan.a") +list(APPEND STORM_LINK_LIBRARIES "${binary_dir}/src/libsylvan.a") ############################################################# ## diff --git a/resources/3rdparty/sylvan/src/CMakeLists.txt b/resources/3rdparty/sylvan/src/CMakeLists.txt index 739d7e991..f5105f9d3 100644 --- a/resources/3rdparty/sylvan/src/CMakeLists.txt +++ b/resources/3rdparty/sylvan/src/CMakeLists.txt @@ -35,6 +35,13 @@ add_library(sylvan tls.h ) +# We need to make sure that the binary is put into a folder that is independent of the +# build type. Otherwise -- for example when using Xcode -- the binary might end up in a +# sub-folder "Debug" or "Release". +set_target_properties(sylvan PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR} + ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}) + target_link_libraries(sylvan m pthread) include(CheckIncludeFiles)