1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-13 08:24:27 +00:00

3D connexion support on Linux:

- Replace hidapi/linux/hid.c with the hidraw variant (link to udev)
- Add CMakeLists.txt for hidapi, refactor
- Add udev rules file (no installation so far)
This commit is contained in:
Vojtech Kral
2019-09-30 14:58:51 +02:00
parent 1aa559585c
commit 82fed1790a
8 changed files with 544 additions and 1237 deletions
+1
View File
@@ -14,6 +14,7 @@ add_subdirectory(qhull)
add_subdirectory(Shiny)
add_subdirectory(semver)
add_subdirectory(libigl)
add_subdirectory(hidapi)
# Adding libnest2d project for bin packing...
set(LIBNEST2D_UNITTESTS ON CACHE BOOL "Force generating unittests for libnest2d")
+17
View File
@@ -0,0 +1,17 @@
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})
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(hidapi udev)
endif()
+500 -1217
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -169,7 +169,7 @@ add_library(libslic3r_gui STATIC ${SLIC3R_GUI_SOURCES})
encoding_check(libslic3r_gui)
target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui ${GLEW_LIBRARIES} ${HIDAPI_LIBRARIES})
target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui ${GLEW_LIBRARIES} hidapi)
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE)
endif ()
+2
View File
@@ -9,6 +9,8 @@
#include <wx/glcanvas.h>
// WARN: If updating these lists, please also update resources/udev/90-3dconnexion.rules
static const std::vector<int> _3DCONNEXION_VENDORS =
{
0x046d, // LOGITECH = 1133 // Logitech (3Dconnexion is made by Logitech)