Fix .so dependencies: reference -lGL and -lm; only reference -lGLU for demos (Resizer)
authorSylvain Beucler <beuc@beuc.net>
Fri, 9 Mar 2012 20:02:30 +0000 (20:02 +0000)
committerSylvain Beucler <beuc@beuc.net>
Fri, 9 Mar 2012 20:02:30 +0000 (20:02 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1086 7f0cb862-5218-0410-a997-914c9d46530a

CMakeLists.txt

index 29dd515..bf77354 100644 (file)
@@ -85,8 +85,9 @@ OPTION(BUILD_SHARED_LIBS "Build FreeGLUT shared library." ON)
 OPTION(BUILD_STATIC_LIBS "Build FreeGLUT static library." ON)
 
 FIND_PACKAGE(OpenGL REQUIRED)
-
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${OPENGL_INCLUDE_DIR})
+LIST(APPEND LIBS ${OPENGL_gl_LIBRARY})
+LIST(APPEND LIBS m)
 
 IF(WIN32)
        MESSAGE(WARNING "Insecure CRT warnings hidden (might want to fix these)")
@@ -172,7 +173,7 @@ INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL)
 # Optionally build demos, on by default.
 option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON )
 
-SET(DEMO_LIBS ${OPENGL_LIBRARY} ${LIBS})
+SET(DEMO_LIBS ${OPENGL_glu_LIBRARY} ${LIBS})
 LIST(APPEND DEMO_LIBS m)
 
 MACRO(ADD_DEMO name)