|
| 1 | +diff --git a/source/Legacy/CMakeLists.txt b/source/Legacy/CMakeLists.txt |
| 2 | +index 2a7367c..a0bfbd3 100644 |
| 3 | +--- a/source/Legacy/CMakeLists.txt |
| 4 | ++++ b/source/Legacy/CMakeLists.txt |
| 5 | +@@ -86,12 +86,12 @@ set_target_properties(MultiSense PROPERTIES PUBLIC_HEADER "${MULTISENSE_HEADERS} |
| 6 | + # We want to link against our child libraries. |
| 7 | + # |
| 8 | + |
| 9 | +-if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") |
| 10 | ++find_package(Threads REQUIRED) |
| 11 | ++target_link_libraries(MultiSense Threads::Threads) |
| 12 | ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") |
| 13 | + target_link_libraries(MultiSense ws2_32) |
| 14 | +-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
| 15 | +- target_link_libraries(MultiSense pthread) |
| 16 | +-else() |
| 17 | +- target_link_libraries(MultiSense pthread rt) |
| 18 | ++elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 19 | ++ target_link_libraries(MultiSense rt) |
| 20 | + endif() |
| 21 | + |
| 22 | + include(CMakePackageConfigHelpers) |
| 23 | +diff --git a/source/LibMultiSense/CMakeLists.txt b/source/LibMultiSense/CMakeLists.txt |
| 24 | +index 7a4cb8e..72e2e54 100644 |
| 25 | +--- a/source/LibMultiSense/CMakeLists.txt |
| 26 | ++++ b/source/LibMultiSense/CMakeLists.txt |
| 27 | +@@ -66,12 +66,12 @@ set_target_properties(MultiSense PROPERTIES PUBLIC_HEADER "${MULTISENSE_HEADERS} |
| 28 | + # We want to link against our child libraries. |
| 29 | + # |
| 30 | + |
| 31 | +-if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") |
| 32 | ++find_package(Threads REQUIRED) |
| 33 | ++target_link_libraries(MultiSense Threads::Threads) |
| 34 | ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") |
| 35 | + target_link_libraries(MultiSense ws2_32) |
| 36 | +-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
| 37 | +- target_link_libraries(MultiSense pthread) |
| 38 | +-else() |
| 39 | +- target_link_libraries(MultiSense pthread rt) |
| 40 | ++elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 41 | ++ target_link_libraries(MultiSense rt) |
| 42 | + endif() |
| 43 | + |
| 44 | + if (BUILD_TESTS) |
| 45 | +diff --git a/source/Utilities/Legacy/CMakeLists.txt b/source/Utilities/Legacy/CMakeLists.txt |
| 46 | +index 21c747d..da05f78 100644 |
| 47 | +--- a/source/Utilities/Legacy/CMakeLists.txt |
| 48 | ++++ b/source/Utilities/Legacy/CMakeLists.txt |
| 49 | +@@ -8,32 +8,16 @@ include_directories(shared) |
| 50 | + # Common libraries that each utility needs to link with. |
| 51 | + # |
| 52 | + |
| 53 | +-if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") |
| 54 | +- |
| 55 | +-set (MULTISENSE_UTILITY_LIBS |
| 56 | +- ${MULTISENSE_UTILITY_LIBS} |
| 57 | +- MultiSense |
| 58 | +- ws2_32 |
| 59 | +-) |
| 60 | +- |
| 61 | +-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
| 62 | +- |
| 63 | +-set (MULTISENSE_UTILITY_LIBS |
| 64 | +- ${MULTISENSE_UTILITY_LIBS} |
| 65 | ++find_package(Threads REQUIRED) |
| 66 | ++list(APPEND MULTISENSE_UTILITY_LIBS |
| 67 | + MultiSense |
| 68 | +- pthread |
| 69 | ++ Threads::Threads |
| 70 | + ) |
| 71 | +- |
| 72 | +-else () |
| 73 | +- |
| 74 | +-set (MULTISENSE_UTILITY_LIBS |
| 75 | +- ${MULTISENSE_UTILITY_LIBS} |
| 76 | +- MultiSense |
| 77 | +- pthread |
| 78 | +- rt |
| 79 | +-) |
| 80 | +- |
| 81 | +-endif () |
| 82 | ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") |
| 83 | ++ list(APPEND MULTISENSE_UTILITY_LIBS ws2_32) |
| 84 | ++elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 85 | ++ list(APPEND MULTISENSE_UTILITY_LIBS rt) |
| 86 | ++endif() |
| 87 | + |
| 88 | + # |
| 89 | + # Recurse into each of these directories. |
| 90 | +diff --git a/source/Utilities/LibMultiSense/CMakeLists.txt b/source/Utilities/LibMultiSense/CMakeLists.txt |
| 91 | +index 3d21f9b..0d9a992 100644 |
| 92 | +--- a/source/Utilities/LibMultiSense/CMakeLists.txt |
| 93 | ++++ b/source/Utilities/LibMultiSense/CMakeLists.txt |
| 94 | +@@ -1,30 +1,13 @@ |
| 95 | +- |
| 96 | +-if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") |
| 97 | +- |
| 98 | +-set (MULTISENSE_UTILITY_LIBS |
| 99 | +- ${MULTISENSE_UTILITY_LIBS} |
| 100 | +- MultiSense |
| 101 | +- ws2_32 |
| 102 | +-) |
| 103 | +- |
| 104 | +-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
| 105 | +- |
| 106 | +-set (MULTISENSE_UTILITY_LIBS |
| 107 | +- ${MULTISENSE_UTILITY_LIBS} |
| 108 | +- MultiSense |
| 109 | +- pthread |
| 110 | ++find_package(Threads REQUIRED) |
| 111 | ++list(APPEND MULTISENSE_UTILITY_LIBS |
| 112 | ++ MultiSense |
| 113 | ++ Threads::Threads |
| 114 | + ) |
| 115 | +- |
| 116 | +-else () |
| 117 | +- |
| 118 | +-set (MULTISENSE_UTILITY_LIBS |
| 119 | +- ${MULTISENSE_UTILITY_LIBS} |
| 120 | +- MultiSense |
| 121 | +- pthread |
| 122 | +- rt |
| 123 | +-) |
| 124 | +- |
| 125 | +-endif () |
| 126 | ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") |
| 127 | ++ list(APPEND MULTISENSE_UTILITY_LIBS ws2_32) |
| 128 | ++elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 129 | ++ list(APPEND MULTISENSE_UTILITY_LIBS rt) |
| 130 | ++endif() |
| 131 | + |
| 132 | + add_subdirectory(ChangeIpUtility) |
| 133 | + add_subdirectory(DeviceInfoUtility) |
0 commit comments