mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-02 04:51: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)
|
if(ENABLE_BLUEZ)
|
||||||
find_package(bluez REQUIRED)
|
find_package(bluez REQUIRED)
|
||||||
set(ENABLE_WIIMOTE ON)
|
set(SUPPORTS_WIIMOTE ON)
|
||||||
add_compile_definitions(HAS_BLUEZ)
|
add_compile_definitions(HAS_BLUEZ)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ endif()
|
||||||
|
|
||||||
if (ENABLE_HIDAPI)
|
if (ENABLE_HIDAPI)
|
||||||
find_package(hidapi REQUIRED)
|
find_package(hidapi REQUIRED)
|
||||||
set(ENABLE_WIIMOTE ON)
|
set(SUPPORTS_WIIMOTE ON)
|
||||||
add_compile_definitions(HAS_HIDAPI)
|
add_compile_definitions(HAS_HIDAPI)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ if(WIN32)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_WIIMOTE)
|
if (SUPPORTS_WIIMOTE)
|
||||||
target_compile_definitions(CemuInput PUBLIC SUPPORTS_WIIMOTE)
|
target_compile_definitions(CemuInput PUBLIC SUPPORTS_WIIMOTE)
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/Wiimote/WiimoteControllerProvider.h
|
api/Wiimote/WiimoteControllerProvider.h
|
||||||
|
@ -70,10 +70,14 @@ if (ENABLE_WIIMOTE)
|
||||||
api/Wiimote/NativeWiimoteController.h
|
api/Wiimote/NativeWiimoteController.h
|
||||||
api/Wiimote/NativeWiimoteController.cpp
|
api/Wiimote/NativeWiimoteController.cpp
|
||||||
api/Wiimote/WiimoteDevice.h
|
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/hidapi/HidapiWiimote.cpp
|
||||||
|
api/Wiimote/hidapi/HidapiWiimote.h)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (ENABLE_BLUEZ)
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/Wiimote/l2cap/L2CapWiimote.cpp
|
api/Wiimote/l2cap/L2CapWiimote.cpp
|
||||||
api/Wiimote/l2cap/L2CapWiimote.h)
|
api/Wiimote/l2cap/L2CapWiimote.h)
|
||||||
|
@ -95,6 +99,7 @@ target_link_libraries(CemuInput PRIVATE
|
||||||
pugixml::pugixml
|
pugixml::pugixml
|
||||||
SDL2::SDL2
|
SDL2::SDL2
|
||||||
)
|
)
|
||||||
|
|
||||||
if (ENABLE_HIDAPI)
|
if (ENABLE_HIDAPI)
|
||||||
target_link_libraries(CemuInput PRIVATE hidapi::hidapi)
|
target_link_libraries(CemuInput PRIVATE hidapi::hidapi)
|
||||||
endif()
|
endif()
|
||||||
|
@ -103,7 +108,6 @@ if (ENABLE_WXWIDGETS)
|
||||||
target_link_libraries(CemuInput PRIVATE wx::base wx::core)
|
target_link_libraries(CemuInput PRIVATE wx::base wx::core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (ENABLE_BLUEZ)
|
if (ENABLE_BLUEZ)
|
||||||
target_link_libraries(CemuInput PRIVATE bluez::bluez)
|
target_link_libraries(CemuInput PRIVATE bluez::bluez)
|
||||||
endif ()
|
endif ()
|
Loading…
Add table
Add a link
Reference in a new issue