From f95941bbba15c016e8ceba55accd79f98c171aa9 Mon Sep 17 00:00:00 2001 From: don bright Date: Thu, 23 May 2013 19:31:49 -0700 Subject: [PATCH] update cmake to work with custom built GLU in $BASEDIR --- tests/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9821d701..39dc341b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -252,6 +252,18 @@ endif() # OpenGL find_package(OpenGL REQUIRED) +if (NOT OPENGL_GLU_FOUND) + message(STATUS "GLU not found in system paths...searching $ENV{OPENSCAD_LIBRARIES} ") + find_library(OPENGL_glu_LIBRARY GLU HINTS $ENV{OPENSCAD_LIBRARIES}/lib) + if (NOT OPENGL_glu_LIBRARY) + message(FATAL "GLU library not found") + endif() + set(OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES}) + message(STATUS "OpenGL LIBRARIES: ") + foreach(GLLIB ${OPENGL_LIBRARIES}) + message(STATUS " " ${GLLIB}) + endforeach() +endif() # OpenCSG if (NOT $ENV{OPENCSGDIR} STREQUAL "")