Skip to content

Commit

Permalink
reconfigure build to use vendor hidapi installed on system
Browse files Browse the repository at this point in the history
  • Loading branch information
beatboxchad committed Jun 8, 2024
1 parent d5552c2 commit 0c8f880
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion external_libraries/hidapi
Submodule hidapi updated 83 files
+0 −16 AUTHORS.txt
+5 −93 CMakeLists.txt
+0 −15 HACKING.txt
+0 −9 LICENSE-orig.txt
+0 −90 Makefile.am
+0 −371 README.txt
+0 −19 android/jni/Android.mk
+0 −2 bootstrap
+0 −254 configure.ac
+0 −1,630 doxygen/Doxyfile
+0 −1 hidapi/CMakeLists.txt
+0 −442 hidapi/hidapi.h
+4 −9 hidapi2osc/CMakeLists.txt
+15 −10 hidapi_parser/CMakeLists.txt
+0 −2 hidapi_parser/hidapi_parser.c
+2 −8 hidparsertest/CMakeLists.txt
+0 −17 hidtest/.gitignore
+0 −18 hidtest/CMakeLists.txt
+0 −20 hidtest/Makefile.am
+0 −680 hidtest/hidtest.cpp
+0 −18 hidtestosx/CMakeLists.txt
+0 −81 hidtestosx/hidtestosx.cpp
+0 −18 hidtestwindows/CMakeLists.txt
+0 −311 hidtestwindows/hidtestwindows.cpp
+0 −8 libusb/.gitignore
+0 −32 libusb/CMakeLists.txt
+0 −18 libusb/Makefile-manual
+0 −27 libusb/Makefile.am
+0 −46 libusb/Makefile.freebsd
+0 −49 libusb/Makefile.linux
+0 −1,570 libusb/hid.c
+0 −18 linux/.gitignore
+0 −20 linux/CMakeLists.txt
+0 −49 linux/Makefile-manual
+0 −10 linux/Makefile.am
+0 −63 linux/README.txt
+0 −833 linux/hid.c
+0 −5 m4/.gitignore
+0 −309 m4/ax_pthread.m4
+0 −157 m4/pkg.m4
+0 −17 mac/.gitignore
+0 −11 mac/CMakeLists.txt
+0 −32 mac/Makefile-manual
+0 −9 mac/Makefile.am
+0 −1,394 mac/hid.c
+0 −1 pc/.gitignore
+0 −10 pc/hidapi-hidraw.pc.in
+0 −10 pc/hidapi-libusb.pc.in
+0 −10 pc/hidapi.pc.in
+0 −20 testgui/.gitignore
+0 −26 testgui/Makefile-manual
+0 −43 testgui/Makefile.am
+0 −33 testgui/Makefile.freebsd
+0 −32 testgui/Makefile.linux
+0 −46 testgui/Makefile.mac
+0 −32 testgui/Makefile.mingw
+0 −28 testgui/TestGUI.app.in/Contents/Info.plist
+0 −1 testgui/TestGUI.app.in/Contents/PkgInfo
+ testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings
+ testgui/TestGUI.app.in/Contents/Resources/Signal11.icns
+0 −97 testgui/copy_to_bundle.sh
+0 −134 testgui/mac_support.cpp
+0 −17 testgui/mac_support.h
+0 −94 testgui/mac_support_cocoa.m
+0 −2 testgui/start.sh
+0 −532 testgui/test.cpp
+0 −20 testgui/testgui.sln
+0 −217 testgui/testgui.vcproj
+0 −32 udev/99-hid.rules
+0 −15 windows/.gitignore
+0 −5 windows/CMakeLists.txt
+0 −14 windows/Makefile-manual
+0 −16 windows/Makefile.am
+0 −35 windows/Makefile.mingw
+0 −2 windows/ddk_build/.gitignore
+0 −17 windows/ddk_build/hidapi.def
+0 −49 windows/ddk_build/makefile
+0 −23 windows/ddk_build/sources
+0 −854 windows/hid.c
+0 −29 windows/hidapi.sln
+0 −201 windows/hidapi.vcproj
+0 −88 windows/hidsdi.h
+0 −196 windows/hidtest.vcproj
15 changes: 4 additions & 11 deletions lang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ endif(WIN32)

if(SC_HIDAPI)
list(APPEND sclang_sources LangPrimSource/SC_HID_api.cpp)
find_package(hidapi REQUIRED)
include_directories(
${CMAKE_SOURCE_DIR}/external_libraries/hidapi/hidapi
${CMAKE_SOURCE_DIR}/external_libraries/hidapi/hidapi_parser
${CMAKE_SOURCE_DIR}/external_libraries/hidapi
)
add_definitions(-DSC_HIDAPI)
endif(SC_HIDAPI)
Expand Down Expand Up @@ -231,14 +231,7 @@ endif()

if(SC_HIDAPI)
target_compile_definitions(libsclang PRIVATE HAVE_HIDAPI)
target_link_libraries( libsclang hidapi hidapi_parser )

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND HID_HIDRAW)
target_link_libraries( libsclang ${UDEV_LIBRARIES})
endif()
if(HID_LIBUSB)
target_link_libraries( libsclang ${LIBUSB_1_LIBRARIES})
endif()
target_link_libraries( libsclang hidapi::hidapi hidapi_parser)
endif()

target_link_libraries(libsclang boost_thread_lib boost_system_lib boost_regex_lib boost_filesystem_lib)
Expand Down Expand Up @@ -326,7 +319,7 @@ if (FFTW3F_FOUND)
endif()

if (WIN32 AND SC_HIDAPI)
target_link_libraries(libsclang wsock32 ws2_32 portmidi iphlpapi hid)
target_link_libraries(libsclang wsock32 ws2_32 portmidi iphlpapi hidapi::windows)
elseif(WIN32)
target_link_libraries(libsclang wsock32 ws2_32 portmidi iphlpapi)
endif()
Expand Down

0 comments on commit 0c8f880

Please sign in to comment.