Skip to content

Commit

Permalink
cmake: link system libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
timblechmann committed Dec 17, 2023
1 parent 310af5c commit b3d52e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ target_link_libraries(boost_interprocess
Boost::winapi
)

if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(boost_interprocess INTERFACE rt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(boost_interprocess INTERFACE ole32 oleaut32 psapi advapi32)
endif()

if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

add_subdirectory(test)
Expand Down

0 comments on commit b3d52e5

Please sign in to comment.