From e16a3250060cacc6cd8562c7fb21ba382643a170 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 3 Mar 2014 16:36:37 -0800 Subject: [PATCH] optionally do not reference OPENGL_INCLUDE_DIR for win --- interface/CMakeLists.txt | 6 +++++- svo-viewer/CMakeLists.txt | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index d923404c60..646ad3c167 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -231,7 +231,11 @@ if (APPLE) else (APPLE) find_package(OpenGL REQUIRED) find_package(GLUT REQUIRED) - include_directories(${GLUT_INCLUDE_DIR} "${OPENGL_INCLUDE_DIR}") + + if (OPENGL_INCLUDE_DIR) + include_directories("${GLUT_INCLUDE_DIR}" "${OPENGL_INCLUDE_DIR}") + endif (OPENGL_INCLUDE_DIR) + target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}") endif (APPLE) diff --git a/svo-viewer/CMakeLists.txt b/svo-viewer/CMakeLists.txt index b74612d3eb..c76cc4209b 100644 --- a/svo-viewer/CMakeLists.txt +++ b/svo-viewer/CMakeLists.txt @@ -162,7 +162,11 @@ if (APPLE) else (APPLE) find_package(OpenGL REQUIRED) find_package(GLUT REQUIRED) - include_directories("${GLUT_INCLUDE_DIR}" "${OPENGL_INCLUDE_DIR}") + + if (OPENGL_INCLUDE_DIR) + include_directories("${GLUT_INCLUDE_DIR}" "${OPENGL_INCLUDE_DIR}") + endif (OPENGL_INCLUDE_DIR) + target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}") endif (APPLE)