mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-01 20:41:19 +12:00
cmake: Respect ENABLE_HIDAPI
option (#1604)
This commit is contained in:
parent
4f4412b334
commit
057ef4598e
2 changed files with 13 additions and 9 deletions
|
@ -166,7 +166,7 @@ if (UNIX AND NOT APPLE)
|
|||
|
||||
if(ENABLE_BLUEZ)
|
||||
find_package(bluez REQUIRED)
|
||||
set(ENABLE_WIIMOTE ON)
|
||||
set(SUPPORTS_WIIMOTE ON)
|
||||
add_compile_definitions(HAS_BLUEZ)
|
||||
endif()
|
||||
|
||||
|
@ -188,7 +188,7 @@ endif()
|
|||
|
||||
if (ENABLE_HIDAPI)
|
||||
find_package(hidapi REQUIRED)
|
||||
set(ENABLE_WIIMOTE ON)
|
||||
set(SUPPORTS_WIIMOTE ON)
|
||||
add_compile_definitions(HAS_HIDAPI)
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ if(WIN32)
|
|||
)
|
||||
endif()
|
||||
|
||||
if (ENABLE_WIIMOTE)
|
||||
if (SUPPORTS_WIIMOTE)
|
||||
target_compile_definitions(CemuInput PUBLIC SUPPORTS_WIIMOTE)
|
||||
target_sources(CemuInput PRIVATE
|
||||
api/Wiimote/WiimoteControllerProvider.h
|
||||
|
@ -70,13 +70,17 @@ if (ENABLE_WIIMOTE)
|
|||
api/Wiimote/NativeWiimoteController.h
|
||||
api/Wiimote/NativeWiimoteController.cpp
|
||||
api/Wiimote/WiimoteDevice.h
|
||||
api/Wiimote/hidapi/HidapiWiimote.cpp
|
||||
api/Wiimote/hidapi/HidapiWiimote.h
|
||||
)
|
||||
if (UNIX AND NOT APPLE)
|
||||
if (ENABLE_HIDAPI)
|
||||
target_sources(CemuInput PRIVATE
|
||||
api/Wiimote/l2cap/L2CapWiimote.cpp
|
||||
api/Wiimote/l2cap/L2CapWiimote.h)
|
||||
api/Wiimote/hidapi/HidapiWiimote.cpp
|
||||
api/Wiimote/hidapi/HidapiWiimote.h)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_BLUEZ)
|
||||
target_sources(CemuInput PRIVATE
|
||||
api/Wiimote/l2cap/L2CapWiimote.cpp
|
||||
api/Wiimote/l2cap/L2CapWiimote.h)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
|
@ -95,6 +99,7 @@ target_link_libraries(CemuInput PRIVATE
|
|||
pugixml::pugixml
|
||||
SDL2::SDL2
|
||||
)
|
||||
|
||||
if (ENABLE_HIDAPI)
|
||||
target_link_libraries(CemuInput PRIVATE hidapi::hidapi)
|
||||
endif()
|
||||
|
@ -103,7 +108,6 @@ if (ENABLE_WXWIDGETS)
|
|||
target_link_libraries(CemuInput PRIVATE wx::base wx::core)
|
||||
endif()
|
||||
|
||||
|
||||
if (ENABLE_BLUEZ)
|
||||
target_link_libraries(CemuInput PRIVATE bluez::bluez)
|
||||
endif ()
|
Loading…
Add table
Add a link
Reference in a new issue