From 5cdc14bb0aee2cae9ecb419e6f7aeffee3e4face Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 29 May 2018 20:05:58 +0200 Subject: [PATCH] Use find_library to search for storm libs --- CMakeLists.txt | 1 + cmake/CMakeLists.txt | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0d0130..af8c593 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ option(STORMPY_DISABLE_SIGNATURE_DOC "disables the signature in the documentatio configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h) message(STATUS "STORM-DIR: ${storm_DIR}") +message(STATUS "STORM-INCLUDE-DIR: ${storm_INCLUDE_DIR}") function(stormpy_module NAME) # second, optional argument are ADDITIONAL_LIBRARIES diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index bbaf9c4..62123d9 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -6,20 +6,19 @@ find_package(storm REQUIRED) # Set configuration set(STORM_DIR ${storm_DIR}) set(STORM_VERSION ${storm_VERSION}) +set(STORM_LIBS ${storm_LIBRARIES}) # Check for storm-pars -if(EXISTS "${storm_DIR}/lib/libstorm-pars.dylib") - set(HAVE_STORM_PARS TRUE) -elseif(EXISTS "${storm_DIR}/lib/libstorm-pars.so") +find_library(STORM_PARS NAMES storm-pars HINTS "${storm_DIR}/lib/") +if(STORM_PARS) set(HAVE_STORM_PARS TRUE) else() set(HAVE_STORM_PARS FALSE) endif() # Check for storm-dft -if(EXISTS "${storm_DIR}/lib/libstorm-dft.dylib") - set(HAVE_STORM_DFT TRUE) -elseif(EXISTS "${storm_DIR}/lib/libstorm-dft.so") +find_library(STORM_DFT NAMES storm-dft HINTS "${storm_DIR}/lib/") +if(STORM_DFT) set(HAVE_STORM_DFT TRUE) else() set(HAVE_STORM_DFT FALSE)