diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f4e7c9de..7a153e23d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,6 +184,9 @@ find_package(OpenGL REQUIRED) include_directories(${OPENGL_INCLUDE_DIR}) if(UNIX AND NOT APPLE) + find_package(X11 REQUIRED) + include_directories(${X11_INCLUDE_DIR}) + if(USE_XRANDR) find_package(Xrandr REQUIRED) if(NOT XRANDR_FOUND) @@ -321,6 +324,7 @@ target_link_libraries(supertuxkart ) if(UNIX AND NOT APPLE) + target_link_libraries(supertuxkart ${X11_LIBRARIES}) if(USE_XRANDR) target_link_libraries(supertuxkart ${XRANDR_LIBRARIES}) else()