From 1ae540a1277e34572b9cbf92065bab52ede1f0f7 Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Fri, 9 Mar 2012 20:02:30 +0000 Subject: [PATCH] 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 --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 1.7.10.4