Skip to content

Commit

Permalink
Merge pull request #62 from leapmotion/bug-pthread
Browse files Browse the repository at this point in the history
Cleaning up boost find_package and linkage spec
  • Loading branch information
gtremper committed Aug 19, 2014
2 parents 862df7a + 691731e commit 60680d6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/autowiring/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,17 @@ endif()
set_property(TARGET Autowiring PROPERTY FOLDER "Autowiring")

# Might as well reference the boost libraries to satisfy link dependencies, if we know they exist
find_package(Boost COMPONENTS system date_time QUIET)
find_package(Boost COMPONENTS thread atomic system chrono date_time QUIET)
if(Boost_FOUND)
target_link_libraries(Autowiring ${Boost_LIBRARIES})
endif()

if(UNIX)
target_link_libraries(Autowiring pthread)
# Need multithreading services if available
find_package(Threads)
if(Threads_FOUND)
if(CMAKE_USE_PTHREADS_INIT)
target_link_libraries(Autowiring ${CMAKE_THREAD_LIBS_INIT})
endif()
endif()

install(TARGETS Autowiring DESTINATION lib COMPONENT autowiring CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES})
Expand Down

0 comments on commit 60680d6

Please sign in to comment.