]> git.mxchange.org Git - flightgear.git/commitdiff
Fix compile with CMake 3.2.1, by Kevin Seroux
authorRebecca N. Palmer <rebecca_palmer@zoho.com>
Fri, 3 Apr 2015 18:15:52 +0000 (19:15 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Fri, 3 Apr 2015 18:15:52 +0000 (19:15 +0100)
Explicitly link X11, as this no longer comes with OpenGL

CMakeLists.txt
src/Main/CMakeLists.txt
utils/fgviewer/CMakeLists.txt

index c881c32205e0e35b37ada786eac1af5a1cce212a..c443f588e6e2dc618e5277b7fd65df3cd91cf2c4 100644 (file)
@@ -110,6 +110,7 @@ IF(APPLE)
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
     find_package(Threads REQUIRED)
+    find_package(X11 REQUIRED)
     
     set(USE_DBUS_DEFAULT 1)
 
index 949b379ddad705acdf3e6d348719bcb7a6e99fdc..4b6926e9bf0379f1557688d1d19a76569654cbab 100644 (file)
@@ -130,7 +130,9 @@ endif()
 if (CRASHRPT_FOUND)
        target_link_libraries(fgfs ${CRASHRPT_LIBRARY})
 endif()
-
+if(X11_FOUND)
+    target_link_libraries(fgfs ${X11_LIBRARIES})
+endif()
 target_link_libraries(fgfs
        ${SQLITE3_LIBRARY}
        ${SIMGEAR_LIBRARIES}
index 165be74846729ce0cf21169dd06d4090454e9dc1..bfc52ad50aa68e3887ab89be28458a6276659f39 100644 (file)
@@ -42,6 +42,10 @@ else()
 endif()
 
 add_executable(fgviewer ${FGVIEWER_SOURCES} ${FGVIEWER_RTI_SOURCES})
+if(X11_FOUND)
+    target_link_libraries(fgviewer ${X11_LIBRARIES})
+endif()
+
 target_link_libraries(fgviewer
        ${SIMGEAR_LIBRARIES}
        ${OPENSCENEGRAPH_LIBRARIES}