Skip to content

Commit

Permalink
Merge pull request #207 from timblechmann/feature/cmake-usage-require…
Browse files Browse the repository at this point in the history
…ments

cmake: link system libraries
  • Loading branch information
igaztanaga authored Jul 6, 2024
2 parents e634913 + b3d52e5 commit 4a1f284
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 4a1f284

Please sign in to comment.