Open
Description
The boost thread library build depends on the existence of the BOOST_THREAD_BUILD_LIB
(static) or BOOST_THREAD_BUILD_DLL
(dynamic) definitions.
In the normal build, it is defined in its Jamfile.
Without one of these defined, it marks functions defined in cpp files with dllimport on Windows.
The following addition to its CMakeLists solves the problem:
if (BUILD_SHARED_LIBS)
target_compile_definitions(boost_thread PRIVATE BOOST_THREAD_BUILD_DLL)
else()
target_compile_definitions(boost_thread PRIVATE BOOST_THREAD_BUILD_LIB)
endif()
Metadata
Metadata
Assignees
Labels
No labels