conditionally include the OPENGL_INCLUDE_DIR since it is empty on windows

This commit is contained in:
Stephen Birarda 2014-03-07 12:22:58 -08:00
parent 01f155a103
commit e3363dd304
2 changed files with 6 additions and 3 deletions

View file

@ -73,8 +73,6 @@ else ()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIR GLUT_LIBRARIES)
message(${GLUT_INCLUDE_DIR})
if (GLUT_FOUND)
if (NOT GLUT_FIND_QUIETLY)
message(STATUS "Found GLUT: ${GLUT_LIBRARIES}")

View file

@ -215,7 +215,12 @@ else (APPLE)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories(SYSTEM "${GLUT_INCLUDE_DIR}" "${OPENGL_INCLUDE_DIR}")
include_directories(SYSTEM "${GLUT_INCLUDE_DIR}")
if (${OPENGL_INCLUDE_DIR})
include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}")
endif ()
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}" "${GLUT_LIBRARIES}")
# link target to external libraries