Skip to content

Commit

Permalink
Require static boost libs only if necessary
Browse files Browse the repository at this point in the history
Some distros don't ship static libraries by default, therefore requiring
them by default breaks on those. Also, it makes no sense, really.

Fixes one build issue on openSUSE Leap.
  • Loading branch information
TheAssassin committed Dec 3, 2021
1 parent 5fb5ca5 commit fb5cd4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -4,7 +4,10 @@ cmake_minimum_required(VERSION 3.5)
# globally include own includes
include_directories(${PROJECT_SOURCE_DIR}/include)

set(Boost_USE_STATIC_LIBS ON)
if(STATIC_BUILD)
set(Boost_USE_STATIC_LIBS ON)
endif()

find_package(Boost REQUIRED COMPONENTS filesystem regex)
set(BOOST_LIBS Boost::filesystem Boost::regex)

Expand Down

0 comments on commit fb5cd4d

Please sign in to comment.