Browse files

working around missing GL libs on Debian and descendent distros

  • Loading branch information...
1 parent ec78a1c commit 15132c8ff6a48fff80ff2afc84f74b9a7f884d57 Richard Vaughan committed Nov 22, 2010
Showing with 8 additions and 7 deletions.
  1. +8 −7 libstage/CMakeLists.txt
View
15 libstage/CMakeLists.txt
@@ -43,17 +43,18 @@ set( stageSrcs
ancestor.cc
)
-# model_laser.cc
-
-
set_source_files_properties( ${stageSrcs} PROPERTIES COMPILE_FLAGS "${FLTK_CFLAGS}" )
add_library(stage SHARED ${stageSrcs})
-target_link_libraries( stage
- ${LTDL_LIB}
- ${OPENGL_LIBRARIES} # seems to be needed on some platforms
-)
+# if fltk-config didn't bring along the OpenGL dependencies (eg. on
+# Debian/Ubuntu), add them explicity
+IF (NOT(${FLTK_LDFLAGS} MATCHES "-lGL"))
+ target_link_libraries( stage ${OPENGL_LIBRARIES})
+ENDIF (NOT(${FLTK_LDFLAGS} MATCHES "-lGL"))
+
+# libtool
+target_link_libraries( stage ${LTDL_LIB} )
# causes the shared library to have a version number
set_target_properties( stage PROPERTIES

0 comments on commit 15132c8

Please sign in to comment.