forked from sensestage/hidapi
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reconfigure build to link vendor hidapi and separate components
- Loading branch information
1 parent
009e4b6
commit dc40db8
Showing
4 changed files
with
23 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
message(STATUS " hidapi_parser" ) | ||
project(hidapi_parser) | ||
find_package(hidapi REQUIRED) | ||
option(HID_DEBUG_PARSER "verbose parser debugging output" OFF) | ||
option(HID_PARSER_TEST "install hidparsertest" OFF) | ||
if( HID_DEBUG_PARSER ) | ||
add_definitions( -DDEBUG_PARSER ) | ||
endif() | ||
|
||
set(SOURCES hidapi_parser.c) | ||
set(HEADERS hidapi_parser.h) | ||
add_library( hidapi_parser STATIC ${SOURCES} ) | ||
|
||
# message( "hidapi parser source dir is: ${hidapi_SOURCE_DIR}" ) | ||
# | ||
# set( hidapi_parser_INCLUDE_DIRS ${hidapi_SOURCE_DIR}/hidapi_parser/) | ||
# # set( hidapi_LIBS ${UDEV_LIBRARIES}) | ||
# set( hidapi_parser_SRCS hidapi_parser.c ) | ||
# | ||
# message( "hidapi_parser include dirs are: ${hidapi_parser_INCLUDE_DIRS}" ) | ||
|
||
include_directories( ${hidapi_SOURCE_DIR}/hidapi/ ) | ||
add_library( hidapi_parser STATIC hidapi_parser.c ) | ||
target_link_libraries( hidapi ) | ||
target_link_libraries(hidapi_parser hidapi::hidapi) | ||
target_include_directories(hidapi_parser PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
message(STATUS " hidparsertest" ) | ||
|
||
include_directories( | ||
${CMAKE_BINARY_DIR} | ||
${hidapi_SOURCE_DIR}/hidapi/ | ||
${hidapi_SOURCE_DIR}/hidapi_parser/ | ||
) | ||
|
||
include_directories(${CMAKE_SOURCE_DIR}/hidapi_parser/) | ||
add_executable( hidparsertest hidparsertest.c ) | ||
|
||
target_link_libraries(hidparsertest hidapi hidapi_parser ${EXTRA_LIBS} m) | ||
target_link_libraries(hidparsertest hidapi::hidapi hidapi_parser ${EXTRA_LIBS} m) | ||
|
||
install(TARGETS hidparsertest DESTINATION bin) |