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) #############################################################