From 7080f954b95707fa5d9e572255c5152537a0d987 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 10 Nov 2015 18:39:48 +0100 Subject: [PATCH] Fixed sylvan cmake file to also work with xcode (stripping the build type from the directory) Former-commit-id: 5c934c77935669f3b1126bc98958df9612049d13 --- CMakeLists.txt | 4 +++- resources/3rdparty/sylvan/src/CMakeLists.txt | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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)