Skip to content

Commit

Permalink
MSVC fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vespakoen committed Sep 11, 2023
1 parent 0129f08 commit f9ec320
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/CMakeLists.txt
Expand Up @@ -24,8 +24,13 @@ endforeach()

set(CMAKE_CXX_STANDARD 14)

if(WIN32)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
if(MSVC)
if(USE_STANDALONE OR (DEFINED ENV{USE_STANDALONE} AND
"$ENV{USE_STANDALONE}" IN_LIST TRUTHY_VALUES))
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
endif()

# some options to set what is built:
Expand Down Expand Up @@ -168,7 +173,8 @@ if(USE_OPENMP)
list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/libomp")
endif()
endif()
if(MSVC)
if(MSVC AND (USE_STANDALONE OR (DEFINED ENV{USE_STANDALONE} AND
"$ENV{USE_STANDALONE}" IN_LIST TRUTHY_VALUES)))
set(CMAKE_INSTALL_OPENMP_LIBRARIES ON)
include(InstallRequiredSystemLibraries)
endif()
Expand Down

0 comments on commit f9ec320

Please sign in to comment.