1
0
Fork 0

cmake: Fix Xinerama and Xft dependency issue.

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...).
This commit is contained in:
ThorstenB 2012-01-03 22:02:48 +01:00
parent dac00efbc7
commit 77640e0863
2 changed files with 12 additions and 4 deletions

View file

@ -197,10 +197,20 @@ if(ENABLE_FGADMIN)
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)

View 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}
)