Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/Legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ set_target_properties(MultiSense PROPERTIES PUBLIC_HEADER "${MULTISENSE_HEADERS}
# We want to link against our child libraries.
#

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
find_package(Threads REQUIRED)
target_link_libraries(MultiSense Threads::Threads)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
target_link_libraries(MultiSense ws2_32)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(MultiSense pthread)
else()
target_link_libraries(MultiSense pthread rt)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(MultiSense rt)
endif()

include(CMakePackageConfigHelpers)
Expand Down
10 changes: 5 additions & 5 deletions source/LibMultiSense/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ set_target_properties(MultiSense PROPERTIES PUBLIC_HEADER "${MULTISENSE_HEADERS}
# We want to link against our child libraries.
#

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
find_package(Threads REQUIRED)
target_link_libraries(MultiSense Threads::Threads)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
target_link_libraries(MultiSense ws2_32)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(MultiSense pthread)
else()
target_link_libraries(MultiSense pthread rt)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(MultiSense rt)
endif()

if (BUILD_TESTS)
Expand Down
1 change: 1 addition & 0 deletions source/LibMultiSense/MultiSenseConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ find_dependency(MultiSenseWire)
if (@BUILD_JSON_SERIALIZATION@)
find_dependency(nlohmann_json 3.9 REQUIRED)
endif ()
find_dependency(Threads)

include("${CMAKE_CURRENT_LIST_DIR}/MultiSenseTargets.cmake")

Expand Down
33 changes: 9 additions & 24 deletions source/Utilities/Legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,17 @@ include_directories(shared)
# Common libraries that each utility needs to link with.
#

if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")

set (MULTISENSE_UTILITY_LIBS
${MULTISENSE_UTILITY_LIBS}
MultiSense
ws2_32
)

elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

set (MULTISENSE_UTILITY_LIBS
${MULTISENSE_UTILITY_LIBS}
MultiSense
pthread
)

else ()

set (MULTISENSE_UTILITY_LIBS
${MULTISENSE_UTILITY_LIBS}
MultiSense
pthread
rt
find_package(Threads REQUIRED)
list(APPEND MULTISENSE_UTILITY_LIBS
MultiSense
Threads::Threads
)

endif ()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND MULTISENSE_UTILITY_LIBS ws2_32)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND MULTISENSE_UTILITY_LIBS rt)
endif()

#
# Recurse into each of these directories.
Expand Down
31 changes: 8 additions & 23 deletions source/Utilities/LibMultiSense/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@

if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")

set (MULTISENSE_UTILITY_LIBS
${MULTISENSE_UTILITY_LIBS}
MultiSense
ws2_32
)

elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

set (MULTISENSE_UTILITY_LIBS
${MULTISENSE_UTILITY_LIBS}
MultiSense
pthread
)

else ()

set (MULTISENSE_UTILITY_LIBS
${MULTISENSE_UTILITY_LIBS}
find_package(Threads REQUIRED)
list(APPEND MULTISENSE_UTILITY_LIBS
MultiSense
pthread
rt
Threads::Threads
)

endif ()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND MULTISENSE_UTILITY_LIBS ws2_32)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND MULTISENSE_UTILITY_LIBS rt)
endif()

add_subdirectory(ChangeIpUtility)
add_subdirectory(DeviceInfoUtility)
Expand Down