Skip to content

Commit

Permalink
Added option to handle messed up Find_Boost from Conan's Boost package
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaa committed Aug 11, 2024
1 parent ec2165c commit c1b7890
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ option(MYSQLPOOL_WITH_TESTS "Enable Tests" OFF)
option(MYSQLPOOL_WITH_INTGRATION_TESTS "Enable Integretion Tests" OFF)
option(MYSQLPOOL_WITH_EXAMPLES "Compile examples" OFF)
option(MYSQLPOOL_EMBEDDED "Do not try to install dependencies" OFF)
option(MYSQLPOOL_BOOST_FROM_CONAN "Find_Boost supplied with the Boost Conan package is messed up and don't support COMPONENT" OFF)

set(MYSQLPOOL_LOGGER "clog" CACHE STRING "Log system to use. One of 'clog', 'internal', 'logfault', 'boost' or 'none'")
set(MYSQLPOOL_LOG_LEVEL_STR "info" CACHE STRING "Minimum log level to enable. One of 'none', error', 'warn', 'info', 'debug', 'trace'")
Expand Down Expand Up @@ -118,7 +119,11 @@ if(NOT DEFINED USE_BOOST_VERSION)
set(USE_BOOST_VERSION 1.83)
endif()

find_package(Boost ${USE_BOOST_VERSION} REQUIRED ALL)
if (NOT MYSQLPOOL_BOOST_FROM_CONAN)
set(BOOST_ALL "ALL")
endif()

find_package(Boost ${USE_BOOST_VERSION} REQUIRED ${BOOST_ALL})

set(MYSQLPOOL_BOOST_LIBRARIES
${BOOST_LOG_DEP}
Expand Down

0 comments on commit c1b7890

Please sign in to comment.