--- CMakeLists.txt.orig 2023-10-16 06:14:43 UTC +++ CMakeLists.txt @@ -32,9 +32,10 @@ find_package(SDL2 REQUIRED) set(SDL2_BUILDING_LIBRARY ON) find_package(SDL2 REQUIRED) +find_package(X11 REQUIRED) FIND_PACKAGE(SDL2_mixer REQUIRED) -include_directories(${SDL2_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR}) +include_directories(${SDL2_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR} ${X11_INCLUDE_DIR}) get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) foreach(dir ${dirs}) message(STATUS "Include dir='${dir}'") @@ -215,7 +216,7 @@ endif() ) endif() -target_link_libraries(SpaceCadetPinball ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY}) +target_link_libraries(SpaceCadetPinball ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY} ${X11_LIBRARIES}) # On Windows, copy DLL to output if(WIN32)