From 3b2c354aa4700f0bc23818068b40407289bc9701 Mon Sep 17 00:00:00 2001 From: codedwrench Date: Fri, 12 Jan 2024 14:48:26 +0100 Subject: [PATCH] fix: add some msvc specifi fixes --- CMakeLists.txt | 1 + cmake/wrapfindboost.cmake | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0533f2..425ba02 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,7 @@ if (WIN32) # We have no GUI anyway! add_definitions(-DNOGDI) + set(BOOST_ROOT "c:/boost" CACHE STRING "Where boost is located") set(PCAP_ROOT_DIR "c:/npcapsdk" CACHE STRING "Where the npcap sdk is located") set(PDCURSES_ROOT_DIR "c:/pdcurses/" CACHE STRING "Where the pdcurses directory is located") diff --git a/cmake/wrapfindboost.cmake b/cmake/wrapfindboost.cmake index efaed60..cd20349 100644 --- a/cmake/wrapfindboost.cmake +++ b/cmake/wrapfindboost.cmake @@ -22,12 +22,15 @@ # wrapfindboost.cmake - Finds boost under our terms. # Usage: Set Boost_ARCHITECTURE if the default arch is not OK, set BOOST_ROOT as well. - if (BUILD_STATIC) set(Boost_NO_SYSTEM_PATHS ON) set(Boost_USE_STATIC_LIBS ON) endif () +if (MSVC) + set(Boost_USE_STATIC_RUNTIME ON) +endif () + # Needed because otherwise the libraries cannot be found. if (BUILD_X32) set(Boost_ARCHITECTURE "-x32")