summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/src/hidapi/netbsd/CMakeLists.txt
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
committer3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
commit5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch)
tree8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/hidapi/netbsd/CMakeLists.txt
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/hidapi/netbsd/CMakeLists.txt')
-rw-r--r--contrib/SDL-3.2.8/src/hidapi/netbsd/CMakeLists.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/hidapi/netbsd/CMakeLists.txt b/contrib/SDL-3.2.8/src/hidapi/netbsd/CMakeLists.txt
new file mode 100644
index 0000000..3b3e4d0
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/hidapi/netbsd/CMakeLists.txt
@@ -0,0 +1,35 @@
1cmake_minimum_required(VERSION 3.6.3...3.25 FATAL_ERROR)
2
3add_library(hidapi_netbsd
4 ${HIDAPI_PUBLIC_HEADERS}
5 hid.c
6)
7target_link_libraries(hidapi_netbsd PUBLIC hidapi_include)
8
9find_package(Threads REQUIRED)
10
11target_link_libraries(hidapi_netbsd PRIVATE Threads::Threads)
12
13set_target_properties(hidapi_netbsd
14 PROPERTIES
15 EXPORT_NAME "netbsd"
16 OUTPUT_NAME "hidapi-netbsd"
17 VERSION ${PROJECT_VERSION}
18 SOVERSION ${PROJECT_VERSION_MAJOR}
19 PUBLIC_HEADER "${HIDAPI_PUBLIC_HEADERS}"
20)
21
22# compatibility with find_package()
23add_library(hidapi::netbsd ALIAS hidapi_netbsd)
24# compatibility with raw library link
25add_library(hidapi-netbsd ALIAS hidapi_netbsd)
26
27if(HIDAPI_INSTALL_TARGETS)
28 install(TARGETS hidapi_netbsd EXPORT hidapi
29 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
30 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
31 PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/hidapi"
32 )
33endif()
34
35hidapi_configure_pc("${PROJECT_ROOT}/pc/hidapi-netbsd.pc.in")