Added find_package for OpenGL in CMake (#771)

This commit is contained in:
henczati
2018-12-17 17:16:01 -05:00
committed by Gines
parent 3caf642da0
commit d8ac84382f
+5 -3
View File
@@ -386,6 +386,8 @@ if (UNIX OR APPLE)
# 3D
if (WITH_3D_RENDERER)
# OpenGL
find_package(OpenGL REQUIRED)
# GLUT
find_package(GLUT REQUIRED)
endif (WITH_3D_RENDERER)
@@ -404,7 +406,7 @@ if (UNIX OR APPLE)
if (WITH_3D_ADAM_MODEL)
if (NOT WITH_3D_RENDERER)
message(FATAL_ERROR "WITH_3D_RENDERER is required if WITH_3D_ADAM_MODEL is enabled.")
endif (WITH_3D_RENDERER)
endif (NOT WITH_3D_RENDERER)
find_package(PkgConfig)
pkg_check_modules(EIGEN3 REQUIRED eigen3)
# Others: sudo apt-get install libglm-dev
@@ -816,7 +818,7 @@ if (WITH_3D_ADAM_MODEL)
include_directories(${EIGEN3_INCLUDE_DIRS})
include_directories(${IGL_INCLUDE_DIRS})
include_directories(${LIBIGL_INCLUDE_DIRS})
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
endif (WITH_3D_ADAM_MODEL)
# Windows includes
if (WIN32)
@@ -861,7 +863,7 @@ if (WITH_3D_ADAM_MODEL)
${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${GLEW_LIBRARY} ${FREE_IMAGE_LIBRARY})
endif (WITH_3D_ADAM_MODEL)
if (WITH_3D_RENDERER)
set(OpenPose_3rdparty_libraries ${OpenPose_3rdparty_libraries} ${GLUT_LIBRARY})
set(OpenPose_3rdparty_libraries ${OpenPose_3rdparty_libraries} ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
endif (WITH_3D_RENDERER)
if (WITH_CERES)
set(OpenPose_3rdparty_libraries ${OpenPose_3rdparty_libraries} ${CERES_LIBRARIES})