]> git.mxchange.org Git - flightgear.git/commitdiff
cmake: Fix Xinerama and Xft dependency issue.
authorThorstenB <brehmt@gmail.com>
Tue, 3 Jan 2012 21:02:48 +0000 (22:02 +0100)
committerThorstenB <brehmt@gmail.com>
Tue, 3 Jan 2012 21:02:48 +0000 (22:02 +0100)
Don't try to add Xinerama/Xft libraries, unless these are installed.
It seems these libraries are also not required on all systems (not required
over here...).

CMakeLists.txt
utils/fgadmin/src/CMakeLists.txt

index 93ee8cfa5ee83d4301150f757db4bba75d125763..87362dd3ec04ea37c9c65d0d1e6b7ff5a5f2cdd6 100644 (file)
@@ -194,13 +194,23 @@ find_package(ALUT REQUIRED)
 find_package(OpenSceneGraph 3.0.0 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA)
 
 if(ENABLE_FGADMIN)
-  find_package(FLTK)
+       find_package(FLTK)
 
        if ( FLTK_FOUND )
+               if ( X11_Xinerama_FOUND )
+                       message(STATUS "Found X11_Xinerama...")
+                       list(APPEND FLTK_LIBRARIES ${COCOA_LIBRARY} ${X11_Xinerama_LIB})
+               endif()
+
+               if ( X11_Xft_FOUND )
+                       message(STATUS "Found X11_Xft...")
+                       list(APPEND FLTK_LIBRARIES ${COCOA_LIBRARY} ${X11_Xft_LIB})
+               endif()
 
                set( CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR} )
-               set( CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xinerama_LIB} ${X11_Xft_LIB} )
+               set( CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES} )
 
+               message(STATUS "Using FLTK_LIBRARIES for fgadmin: ${FLTK_LIBRARIES}")
        endif ( FLTK_FOUND )
 endif(ENABLE_FGADMIN)
 
index 2abfd145ea5047f225683e464d3eef6241e3c71d..222a4c62f625b4f4f6e96ac636382e25b8232935 100644 (file)
@@ -10,8 +10,6 @@ target_link_libraries(fgadmin FGAdminUI
        ${PLIB_LIBRARIES}
        ${FLTK_LIBRARIES}
        ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
-       ${X11_Xinerama_LIB}
-       ${X11_Xft_LIB}
        ${ZLIB_LIBRARY}
 )