mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-20 06:39:09 +08:00

* 1. Remove all global include_directories. * 2. Move 3d party dependencies from src to budled deps if possible. * Unify and enforce one way of including headers: e.g. #include "libslic3r/GCode.hpp" vs #include "GCode.hpp" (always use the "libslic3r/GCode.hpp" option). * Make all dependencies (also header only) a cmake target.
20 lines
534 B
CMake
20 lines
534 B
CMake
|
|
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()
|
|
|
|
|
|
add_library(hidapi STATIC ${HIDAPI_IMPL})
|
|
target_include_directories(hidapi PUBLIC 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 PRIVATE dl)
|
|
endif()
|