Skip to content

Commit

Permalink
Merge pull request #1411 from alarixnia/noevdev
Browse files Browse the repository at this point in the history
qt: Allow compiling on Unix-likes without EVDEV
  • Loading branch information
jpd002 authored Oct 21, 2024
2 parents e70ee16 + 478e490 commit fd39628
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Source/ui_qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ if(USE_GSH_VULKAN)
endif()

if(TARGET_PLATFORM_UNIX)
find_package(LIBEVDEV REQUIRED)
list(APPEND PROJECT_LIBS ${LIBEVDEV_LIBRARY})
list(APPEND DEFINITIONS_LIST HAS_LIBEVDEV=1)
find_package(LIBEVDEV)
if(LIBEVDEV_FOUND)
list(APPEND PROJECT_LIBS ${LIBEVDEV_LIBRARY})
list(APPEND DEFINITIONS_LIST HAS_LIBEVDEV=1)
endif()

list(APPEND PROJECT_LIBS "-static-libgcc")
list(APPEND PROJECT_LIBS "-static-libstdc++")
Expand Down Expand Up @@ -358,10 +360,13 @@ target_compile_definitions(Play PRIVATE ${DEFINITIONS_LIST})
target_include_directories(Play PRIVATE
./
../../
${LIBEVDEV_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)

if(LIBEVDEV_FOUND)
target_include_directories(Play PRIVATE ${LIBEVDEV_INCLUDE_DIR})
endif()

if(TARGET_PLATFORM_WIN32)
find_program(WINDEPLOYQT_EXE windeployqt HINTS "${QT_BINARY_DIRECTORY}")
add_custom_command(TARGET Play POST_BUILD
Expand Down

0 comments on commit fd39628

Please sign in to comment.