Skip to content

Commit 6836ea0

Browse files
CopilotYouw
andauthored
cmake: restore backend policy settings after minimum version
Agent-Logs-Url: https://github.com/libusb/hidapi/sessions/c4b6aaeb-8b94-4451-a245-d4a6fe7f7421 Co-authored-by: Youw <5939659+Youw@users.noreply.github.com>
1 parent c0aa6e7 commit 6836ea0

5 files changed

Lines changed: 28 additions & 0 deletions

File tree

libusb/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
cmake_minimum_required(VERSION 3.6.3...3.25 FATAL_ERROR)
22

3+
foreach(HIDAPI_CMAKE_POLICY CMP0156 CMP0179 CMP0181 CMP0200)
4+
if(POLICY ${HIDAPI_CMAKE_POLICY})
5+
cmake_policy(SET ${HIDAPI_CMAKE_POLICY} NEW)
6+
endif()
7+
endforeach()
8+
unset(HIDAPI_CMAKE_POLICY)
9+
310
list(APPEND HIDAPI_PUBLIC_HEADERS "hidapi_libusb.h")
411

512
add_library(hidapi_libusb

linux/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
cmake_minimum_required(VERSION 3.6.3...3.25 FATAL_ERROR)
22

3+
foreach(HIDAPI_CMAKE_POLICY CMP0156 CMP0179 CMP0181 CMP0200)
4+
if(POLICY ${HIDAPI_CMAKE_POLICY})
5+
cmake_policy(SET ${HIDAPI_CMAKE_POLICY} NEW)
6+
endif()
7+
endforeach()
8+
unset(HIDAPI_CMAKE_POLICY)
9+
310
add_library(hidapi_hidraw
411
${HIDAPI_PUBLIC_HEADERS}
512
hid.c

mac/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
cmake_minimum_required(VERSION 3.4.3...3.25 FATAL_ERROR)
22

3+
foreach(HIDAPI_CMAKE_POLICY CMP0156 CMP0179 CMP0181 CMP0200)
4+
if(POLICY ${HIDAPI_CMAKE_POLICY})
5+
cmake_policy(SET ${HIDAPI_CMAKE_POLICY} NEW)
6+
endif()
7+
endforeach()
8+
unset(HIDAPI_CMAKE_POLICY)
9+
310
list(APPEND HIDAPI_PUBLIC_HEADERS "hidapi_darwin.h")
411

512
add_library(hidapi_darwin

netbsd/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
cmake_minimum_required(VERSION 3.6.3...3.25 FATAL_ERROR)
22

3+
foreach(HIDAPI_CMAKE_POLICY CMP0156 CMP0179 CMP0181 CMP0200)
4+
if(POLICY ${HIDAPI_CMAKE_POLICY})
5+
cmake_policy(SET ${HIDAPI_CMAKE_POLICY} NEW)
6+
endif()
7+
endforeach()
8+
unset(HIDAPI_CMAKE_POLICY)
9+
310
add_library(hidapi_netbsd
411
${HIDAPI_PUBLIC_HEADERS}
512
hid.c

subprojects/.wraplock

Whitespace-only changes.

0 commit comments

Comments
 (0)