]> git.mxchange.org Git - flightgear.git/commitdiff
Try to fix cmake build for fgpanel without GLUT
authorTorsten Dreyer <Torsten@t3r.de>
Thu, 21 Jul 2011 21:42:45 +0000 (23:42 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Thu, 21 Jul 2011 21:42:45 +0000 (23:42 +0200)
CMakeLists.txt
utils/fgpanel/CMakeLists.txt

index 3f21c16453f0ebe32fc861f385017709d504d0cf..364075f9801151de5aefb1b453e5768aafddba95 100644 (file)
@@ -66,12 +66,6 @@ else()
        set(FG_NDEBUG 1)
 endif()
 
-if(WITH_FGPANEL)
-       message(STATUS "Will build fgpanel")
-else()
-       message(STATUS "Will NOT build fgpanel")
-endif()
-
 if(SP_FDMS)
        set(ENABLE_SP_FDM 1)
 endif()
index 65661273bd15ee96d2b3dee7bda2c17af1c8d896..705fe92c7d2fed42b16c127a01843603b10a2678 100644 (file)
@@ -2,25 +2,30 @@
 find_package(PNG REQUIRED)
 find_package(OpenGL REQUIRED)
 find_package(GLUT REQUIRED)
+if(GLUT_FOUND)
+       message(STATUS "found glut")
 
-add_executable(fgpanel main.cxx
-       FGGLApplication.cxx 
-       FGPanelApplication.cxx 
-       FGPNGTextureLoader.cxx 
-       FGRGBTextureLoader.cxx 
-       FGPanelProtocol.cxx
-       FGFontCache.cxx
-       panel.cxx 
-       panel_io.cxx)
+       add_executable(fgpanel main.cxx
+               FGGLApplication.cxx 
+               FGPanelApplication.cxx 
+               FGPNGTextureLoader.cxx 
+               FGRGBTextureLoader.cxx 
+               FGPanelProtocol.cxx
+               FGFontCache.cxx
+               panel.cxx 
+               panel_io.cxx)
 
-target_link_libraries(fgpanel 
-       -lrt
-       ${PNG_LIBRARIES}
-       ${GLUT_LIBRARIES}
-       ${SIMGEAR_LIBRARIES}
-       ${OPENGL_LIBRARIES}
-       ${ZLIB_LIBRARIES}
-       ${PLIB_LIBRARIES}
-       )
+       target_link_libraries(fgpanel 
+               -lrt
+               ${PNG_LIBRARIES}
+               ${GLUT_LIBRARIES}
+               ${SIMGEAR_LIBRARIES}
+               ${OPENGL_LIBRARIES}
+               ${ZLIB_LIBRARIES}
+               ${PLIB_LIBRARIES}
+               )
 
-install(TARGETS fgpanel RUNTIME DESTINATION bin)
+       install(TARGETS fgpanel RUNTIME DESTINATION bin)
+else()
+       message(STATUS "glut NOT found, can't build fgpanel")
+endif()