Skip to content

Commit

Permalink
Lets try disable static runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
aivve committed May 26, 2024
1 parent dbe44fa commit 6290ab5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
$release_name = "karbo-cli-win64-$krb_ver"
mkdir "$build_folder"
cd "$build_folder"
cmake -G "Visual Studio 16 2019" -A x64 -DBoost_DEBUG=ON -DBoost_LIBRARY_SUFFIX="-vc142-mt-x64-1_84" -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib -DBOOST_ROOT="$env:BOOST_ROOT" ..
cmake -G "Visual Studio 16 2019" -A x64 -DBOOST_ROOT="$env:BOOST_ROOT" -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib ..
msbuild Karbowanec.sln /p:Configuration=Release /m
cd src\Release
Compress-Archive -Path *.exe -DestinationPath "$release_name.zip"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
$release_name = "Karbo-cli-win64-$krb_ver"
mkdir "$build_folder"
cd "$build_folder"
cmake -G "Visual Studio 16 2019" -A x64 -DBOOST_ROOT="$env:BOOST_ROOT" ..
cmake -G "Visual Studio 16 2019" -A x64 -DBOOST_ROOT="$env:BOOST_ROOT" -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib ..
msbuild Karbowanec.sln /p:Configuration=Release /m
cd src\Release
Compress-Archive -Path *.exe -DestinationPath "$release_name.zip"
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,14 @@ endif()

# Link static BOOST libraries everywhere
set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options coroutine context atomic)

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
if(DEFINED ENV{CI} AND MSVC)
set(Boost_USE_STATIC_RUNTIME OFF)
else()
set(Boost_USE_STATIC_RUNTIME ON)
endif()

find_package(Boost REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options coroutine context atomic)

message(STATUS "Boost Found: ${Boost_INCLUDE_DIRS}")
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
Expand Down

0 comments on commit 6290ab5

Please sign in to comment.