Add Boost to Hunter config.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2019-12-11 14:23:04 +01:00
parent 3889a1b915
commit c5dc9d4098
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 7 additions and 6 deletions

View File

@ -25,7 +25,8 @@ if(${HUNTER_ENABLED})
# FetchContent_MakeAvailable needs 3.14.
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.14))
set(HUNTER_PACKAGES PocoCpp)
set(HUNTER_Boost_COMPONENTS locale)
set(HUNTER_PACKAGES PocoCpp Boost)
include(FetchContent)
FetchContent_Declare(SetupHunter GIT_REPOSITORY https://github.com/cpp-pm/gate)
FetchContent_MakeAvailable(SetupHunter)
@ -44,6 +45,7 @@ project(remwharead
if(${HUNTER_ENABLED} AND ${CMAKE_VERSION} VERSION_LESS 3.14)
hunter_add_package(PocoCpp)
hunter_add_package(Boost COMPONENTS locale)
endif()
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

View File

@ -1,11 +1,10 @@
include(GNUInstallDirs)
# Some distributions do not contain Poco*Config.cmake recipes.
find_package(Poco
COMPONENTS Foundation Net NetSSL Data DataSQLite JSON XML
CONFIG)
find_package(Poco CONFIG
COMPONENTS Foundation Net NetSSL Data DataSQLite JSON XML)
find_package(Boost COMPONENTS Locale REQUIRED)
find_package(Boost 1.48.0 REQUIRED COMPONENTS locale)
file(GLOB_RECURSE sources_lib *.cpp)
file(GLOB_RECURSE headers_lib ../../include/*.hpp)
@ -24,7 +23,7 @@ target_include_directories(${PROJECT_NAME}
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
target_link_libraries(${PROJECT_NAME}
PRIVATE pthread Boost::Locale
PRIVATE pthread Boost::locale
PUBLIC stdc++fs)
# If no Poco*Config.cmake recipes are found, look for headers in standard dirs.