From 9e66447eb298c8a2541b06ea20c23d101868d984 Mon Sep 17 00:00:00 2001 From: David_Korzeniewski Date: Fri, 15 Nov 2013 12:21:05 +0100 Subject: [PATCH] Add "lib" prefix for z3 only on Windows Former-commit-id: bdfa503070ebf25b278f38bbc648f60d9ce4e2bd --- CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b368f957..1f6c9b578 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,7 @@ if ("${Z3_ROOT}" STREQUAL "") set(ENABLE_Z3 OFF) else() set(ENABLE_Z3 ON) + set(Z3_LIB_NAME "z3") endif() message(STATUS "StoRM - CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") @@ -132,6 +133,10 @@ elseif(MSVC) # Windows.h breaks GMM in gmm_except.h because of its macro definition for min and max add_definitions(/DNOMINMAX) + if(ENABLE_Z3) + set(Z3_LIB_NAME "libz3") + endif() + # MSVC does not do strict-aliasing, so no option needed else(CLANG) message(STATUS "StoRM - Using Compiler Configuration: Clang (LLVM)") @@ -362,9 +367,9 @@ endif(ENABLE_GUROBI) if (ENABLE_Z3) message (STATUS "StoRM - Linking with Z3") include_directories("${Z3_ROOT}/include") - target_link_libraries(storm "libz3") - target_link_libraries(storm-functional-tests "libz3") - target_link_libraries(storm-performance-tests "libz3") + target_link_libraries(storm ${Z3_LIB_NAME}) + target_link_libraries(storm-functional-tests ${Z3_LIB_NAME}) + target_link_libraries(storm-performance-tests ${Z3_LIB_NAME}) endif(ENABLE_Z3) #############################################################