mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 02:52:10 +00:00
Refactor folder (#10475)
Move many third-party components' source codes from the src folder to a new folder called deps_src. The goal is to make the code structure clearer and easier to navigate.
This commit is contained in:
20
deps_src/hidapi/CMakeLists.txt
Normal file
20
deps_src/hidapi/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
if (WIN32)
|
||||
set(HIDAPI_IMPL win/hid.c)
|
||||
elseif (APPLE)
|
||||
set(HIDAPI_IMPL mac/hid.c)
|
||||
else ()
|
||||
# Assume Linux or Unix other than Mac OS
|
||||
set(HIDAPI_IMPL linux/hid.c)
|
||||
endif()
|
||||
|
||||
include_directories(include)
|
||||
|
||||
add_library(hidapi STATIC ${HIDAPI_IMPL})
|
||||
target_include_directories(hidapi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Don't link the udev library, as there are two versions out there (libudev.so.0, libudev.so.1), so they are linked explicitely.
|
||||
# target_link_libraries(hidapi udev)
|
||||
target_link_libraries(hidapi dl)
|
||||
endif()
|
||||
Reference in New Issue
Block a user