From 83b648ae03d41eb53f1f2b78db5bb616050b7556 Mon Sep 17 00:00:00 2001 From: Paul Hughes Date: Mon, 17 Mar 2025 15:24:21 +0000 Subject: [PATCH] fixed linux compilation --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e3d761..cda7213 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,4 +21,10 @@ file(GLOB SOURCES "src/*.cpp") add_executable(MessiVsRonaldo ${SOURCES}) # Include the "include" directory (if you have header files) -target_include_directories(MessiVsRonaldo PUBLIC ${CMAKE_SOURCE_DIR}/include) \ No newline at end of file +target_include_directories(MessiVsRonaldo PUBLIC ${CMAKE_SOURCE_DIR}/include) + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Find the X11 library + find_package(X11 REQUIRED) + target_link_libraries(MessiVsRonaldo ${X11_LIBRARIES}) +endif()