diff options
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.txt | 35 |
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 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.6.3...3.25 FATAL_ERROR) | ||
| 2 | |||
| 3 | add_library(hidapi_netbsd | ||
| 4 | ${HIDAPI_PUBLIC_HEADERS} | ||
| 5 | hid.c | ||
| 6 | ) | ||
| 7 | target_link_libraries(hidapi_netbsd PUBLIC hidapi_include) | ||
| 8 | |||
| 9 | find_package(Threads REQUIRED) | ||
| 10 | |||
| 11 | target_link_libraries(hidapi_netbsd PRIVATE Threads::Threads) | ||
| 12 | |||
| 13 | set_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() | ||
| 23 | add_library(hidapi::netbsd ALIAS hidapi_netbsd) | ||
| 24 | # compatibility with raw library link | ||
| 25 | add_library(hidapi-netbsd ALIAS hidapi_netbsd) | ||
| 26 | |||
| 27 | if(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 | ) | ||
| 33 | endif() | ||
| 34 | |||
| 35 | hidapi_configure_pc("${PROJECT_ROOT}/pc/hidapi-netbsd.pc.in") | ||
