Atlas - CMakeLists.txt

Home / ext / SDL / src / hidapi / windows Lines: 1 | Size: 1608 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1list(APPEND HIDAPI_PUBLIC_HEADERS "hidapi_winapi.h") 2 3set(SOURCES 4 hid.c 5 hidapi_cfgmgr32.h 6 hidapi_descriptor_reconstruct.c 7 hidapi_descriptor_reconstruct.h 8 hidapi_hidclass.h 9 hidapi_hidpi.h 10 hidapi_hidsdi.h 11) 12 13if(BUILD_SHARED_LIBS) 14 list(APPEND SOURCES hidapi.rc) 15endif() 16 17add_library(hidapi_winapi 18 ${HIDAPI_PUBLIC_HEADERS} 19 ${SOURCES} 20) 21target_link_libraries(hidapi_winapi 22 PUBLIC hidapi_include 23) 24 25if(NOT BUILD_SHARED_LIBS) 26 target_compile_definitions(hidapi_winapi 27 # prevent marking functions as __declspec(dllexport) for static library build 28 # #480: this should be refactored for v1.0 29 PUBLIC HID_API_NO_EXPORT_DEFINE 30 ) 31endif() 32 33set_target_properties(hidapi_winapi 34 PROPERTIES 35 EXPORT_NAME "winapi" 36 OUTPUT_NAME "hidapi" 37 VERSION ${PROJECT_VERSION} 38 PUBLIC_HEADER "${HIDAPI_PUBLIC_HEADERS}" 39) 40 41# compatibility with find_package() 42add_library(hidapi::winapi ALIAS hidapi_winapi) 43# compatibility with raw library link 44add_library(hidapi ALIAS hidapi_winapi) 45 46if(HIDAPI_INSTALL_TARGETS) 47 install(TARGETS hidapi_winapi EXPORT hidapi 48 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" 49 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" 50 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" 51 PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/hidapi" 52 ) 53endif() 54 55hidapi_configure_pc("${PROJECT_ROOT}/pc/hidapi.pc.in") 56 57if(HIDAPI_WITH_TESTS) 58 add_subdirectory(test) 59endif() 60 61if(DEFINED HIDAPI_BUILD_PP_DATA_DUMP AND HIDAPI_BUILD_PP_DATA_DUMP) 62 add_subdirectory(pp_data_dump) 63endif() 64
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.