Fix .so dependencies: reference -lGL and -lm; only reference -lGLU for demos (Resizer)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1086 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
beuc 2012-03-09 20:02:30 +00:00
parent cd204c47f8
commit d93aff53ec

View 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)