From b6ef60a86dea155f8860c8a801bf7d808ca64f88 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")