Link against threading library when using Boost.Process

This commit is contained in:
Martchus 2021-06-21 17:44:43 +02:00
parent d91448dfb4
commit eac3b31727
1 changed files with 4 additions and 2 deletions

View File

@ -56,8 +56,8 @@ if (USE_BOOST_PROCESS)
if (BOOST_STATIC_LINKAGE) if (BOOST_STATIC_LINKAGE)
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
endif () endif ()
# add Boost::boost target which represents include directory for header-only deps add Boost::filesystem when building for # add Boost::boost target which represents include directory for header-only deps add Boost::filesystem as
# Windows as it is needed by Boost.Process there # it is needed by Boost.Process
set(BOOST_ARGS REQUIRED) set(BOOST_ARGS REQUIRED)
list(APPEND BOOST_ARGS COMPONENTS filesystem) list(APPEND BOOST_ARGS COMPONENTS filesystem)
use_package(TARGET_NAME Boost::boost PACKAGE_NAME Boost PACKAGE_ARGS "${BOOST_ARGS}") use_package(TARGET_NAME Boost::boost PACKAGE_NAME Boost PACKAGE_ARGS "${BOOST_ARGS}")
@ -70,6 +70,8 @@ if (USE_BOOST_PROCESS)
APPEND APPEND
PROPERTY COMPILE_DEFINITIONS BOOST_USE_WINDOWS_H WIN32_LEAN_AND_MEAN) PROPERTY COMPILE_DEFINITIONS BOOST_USE_WINDOWS_H WIN32_LEAN_AND_MEAN)
endif () endif ()
# add threading library as it is needed by Boost.Process
use_package(TARGET_NAME Threads::Threads PACKAGE_NAME Threads PACKAGE_ARGS REQUIRED)
endif () endif ()
# link also explicitely against the following Qt modules # link also explicitely against the following Qt modules