From: Sylvain Beucler Date: Fri, 9 Mar 2012 20:02:30 +0000 (+0000) Subject: Fix .so dependencies: reference -lGL and -lm; only reference -lGLU for demos (Resizer) X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=1ae540a1277e34572b9cbf92065bab52ede1f0f7;p=freeglut Fix .so dependencies: reference -lGL and -lm; only reference -lGLU for demos (Resizer) git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1086 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 29dd515..bf77354 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)