Skip to content

Commit

Permalink
tweak: boost link
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianTerhorst committed Apr 14, 2024
1 parent 9c23959 commit 0b50ed4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(pplx VERSION 1.0.0 DESCRIPTION "pplx")

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

set(BOOST_INCLUDE_LIBRARIES thread date_time)
set(BOOST_INCLUDE_LIBRARIES system thread date_time)
set(BOOST_ENABLE_CMAKE ON)

include(FetchContent)
Expand All @@ -25,10 +25,12 @@ add_library(${PROJECT_NAME} "")
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION} POSITION_INDEPENDENT_CODE ON)

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
#set(BOOST_SOURCE_DIR "${boost_SOURCE_DIR}")
FetchContent_MakeAvailable(Boost)
include_directories(${boost_SOURCE_DIR})
#target_link_libraries(${PROJECT_NAME} PRIVATE Boost::thread Boost::date_time)
file(GLOB Boost_INCLUDE_DIRS LIST_DIRECTORIES true ${Boost_SOURCE_DIR}/libs/*/include)
target_link_libraries(${PROJECT_NAME} PRIVATE Boost::thread Boost::date_time)
target_include_directories(${PROJECT_NAME}
PUBLIC ${Boost_INCLUDE_DIRS}
)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

target_include_directories(${PROJECT_NAME} PRIVATE include)
Expand Down

0 comments on commit 0b50ed4

Please sign in to comment.