-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix usage * update version * redo x64-windows.cmake * resolve conflicts * updaet git-tree * fix downstream * update version * fix libirecovery * update git-tree * fix pkg_check_modules * update git-tree * fix libfreenect2 * update version * fix libuvc * update version * fix libuvc patch * update git-tree * fix libuvc build_fix.patch * update git-tree * format * update git-tree * undo supports * update git-tree * fix azure-kinect-sensor-sdk * update version * add pkg-config.exe * update git-tree * disable build examples and tests * update git-tree --------- Co-authored-by: Monica <v-liumonica@microsoft.com>
- Loading branch information
1 parent
7d10d3d
commit 8abeb71
Showing
31 changed files
with
181 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,62 @@ | ||
diff --git a/cmakemod/libcaerConfig.cmake.in b/cmakemod/libcaerConfig.cmake.in | ||
index cdf9f88..475d543 100644 | ||
index cdf9f88..f0a17ba 100644 | ||
--- a/cmakemod/libcaerConfig.cmake.in | ||
+++ b/cmakemod/libcaerConfig.cmake.in | ||
@@ -21,6 +21,12 @@ | ||
@@ -21,6 +21,10 @@ | ||
CMAKE_POLICY(PUSH) | ||
CMAKE_POLICY(VERSION 3.10) | ||
|
||
+include(CMakeFindDependencyMacro) | ||
+if(NOT "@CC_MSVC@") | ||
+ find_dependency(PkgConfig) | ||
+ pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0) | ||
+endif() | ||
+find_dependency(PkgConfig) | ||
+pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0) | ||
+ | ||
INCLUDE(@PACKAGE_export_destination@/libcaer-exports.cmake) | ||
SET(libcaer_INCLUDE_DIRS @PACKAGE_include_dirs@) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 3ce94a6..f03d7ae 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -52,16 +52,12 @@ MESSAGE(STATUS "Base libraries: ${BASE_LIBS}") | ||
INCLUDE(FindPkgConfig) | ||
|
||
# Required: basic USB devices support | ||
-IF(CC_MSVC) | ||
- FIND_PACKAGE(libusb CONFIG REQUIRED) | ||
-ELSE() | ||
- PKG_CHECK_MODULES( | ||
- libusb | ||
- REQUIRED | ||
- IMPORTED_TARGET | ||
- libusb-1.0>=1.0.17) | ||
- SET(LIBCAER_PKGCONFIG_REQUIRES_PRIVATE "libusb-1.0 >= 1.0.17") | ||
-ENDIF() | ||
+PKG_CHECK_MODULES( | ||
+ libusb | ||
+ REQUIRED | ||
+ IMPORTED_TARGET | ||
+ libusb-1.0>=1.0.17) | ||
+SET(LIBCAER_PKGCONFIG_REQUIRES_PRIVATE "libusb-1.0 >= 1.0.17") | ||
|
||
# Optional: serial devices support | ||
IF(ENABLE_SERIALDEV) | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 0ef4ac7..6f70a26 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -49,12 +49,11 @@ ENDIF() | ||
|
||
IF(CC_MSVC) | ||
LIST(APPEND LIBCAER_SOURCES ../thirdparty/simple-stdatomic/stdatomic.c) | ||
- INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS}) | ||
- LIST(APPEND LIBCAER_LINK_LIBRARIES_PRIVATE ${LIBUSB_LIBRARIES}) | ||
-ELSE() | ||
- LIST(APPEND LIBCAER_LINK_LIBRARIES_PRIVATE PkgConfig::libusb) | ||
ENDIF() | ||
|
||
+LIST(APPEND LIBCAER_LINK_LIBRARIES_PRIVATE PkgConfig::libusb) | ||
+ | ||
+ | ||
# Set full RPATH | ||
SET(CMAKE_INSTALL_RPATH ${USER_LOCAL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1e0d192..aedc576 100644 | ||
index 3648fb5..43c3d28 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -90,7 +90,7 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) | ||
@@ -91,7 +91,7 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) | ||
|
||
# dependencies | ||
FIND_PACKAGE(PkgConfig) # try find PKGConfig as it will be used if found | ||
-FIND_PACKAGE(LibUSB REQUIRED) | ||
+FIND_PACKAGE(libusb CONFIG REQUIRED) | ||
+pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0) | ||
|
||
# Add includes | ||
INCLUDE_DIRECTORIES( | ||
@@ -98,7 +98,7 @@ INCLUDE_DIRECTORIES( | ||
@@ -99,7 +99,7 @@ INCLUDE_DIRECTORIES( | ||
"${MY_DIR}/include/internal" | ||
${PROJECT_BINARY_DIR} # for generated headers | ||
${LIBFREENECT2_THREADING_INCLUDE_DIR} | ||
- ${LibUSB_INCLUDE_DIRS} | ||
+ ${LIBUSB_INCLUDE_DIRS} | ||
+ ${libusb_INCLUDE_DIRS} | ||
) | ||
|
||
SET(RESOURCES_INC_FILE "${PROJECT_BINARY_DIR}/resources.inc.h") | ||
@@ -154,7 +154,7 @@ SET(SOURCES | ||
@@ -157,7 +157,7 @@ SET(SOURCES | ||
) | ||
|
||
SET(LIBRARIES | ||
- ${LibUSB_LIBRARIES} | ||
+ ${LIBUSB_LIBRARIES} | ||
+ PkgConfig::libusb | ||
${LIBFREENECT2_THREADING_LIBRARIES} | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
libusb provides CMake targets: | ||
libusb can be imported via CMake FindPkgConfig module: | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0) | ||
|
||
find_package(libusb CONFIG REQUIRED) | ||
target_include_directories(main PRIVATE ${LIBUSB_INCLUDE_DIRS}) | ||
target_link_libraries(main PRIVATE ${LIBUSB_LIBRARIES}) | ||
target_link_libraries(main PRIVATE PkgConfig::libusb) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.