提交 d8ac8438 编写于 作者: H henczati 提交者: Gines

Added find_package for OpenGL in CMake (#771)

上级 3caf642d
...@@ -386,6 +386,8 @@ if (UNIX OR APPLE) ...@@ -386,6 +386,8 @@ if (UNIX OR APPLE)
# 3D # 3D
if (WITH_3D_RENDERER) if (WITH_3D_RENDERER)
# OpenGL
find_package(OpenGL REQUIRED)
# GLUT # GLUT
find_package(GLUT REQUIRED) find_package(GLUT REQUIRED)
endif (WITH_3D_RENDERER) endif (WITH_3D_RENDERER)
...@@ -404,7 +406,7 @@ if (UNIX OR APPLE) ...@@ -404,7 +406,7 @@ if (UNIX OR APPLE)
if (WITH_3D_ADAM_MODEL) if (WITH_3D_ADAM_MODEL)
if (NOT WITH_3D_RENDERER) if (NOT WITH_3D_RENDERER)
message(FATAL_ERROR "WITH_3D_RENDERER is required if WITH_3D_ADAM_MODEL is enabled.") 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) find_package(PkgConfig)
pkg_check_modules(EIGEN3 REQUIRED eigen3) pkg_check_modules(EIGEN3 REQUIRED eigen3)
# Others: sudo apt-get install libglm-dev # Others: sudo apt-get install libglm-dev
...@@ -816,7 +818,7 @@ if (WITH_3D_ADAM_MODEL) ...@@ -816,7 +818,7 @@ if (WITH_3D_ADAM_MODEL)
include_directories(${EIGEN3_INCLUDE_DIRS}) include_directories(${EIGEN3_INCLUDE_DIRS})
include_directories(${IGL_INCLUDE_DIRS}) include_directories(${IGL_INCLUDE_DIRS})
include_directories(${LIBIGL_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) endif (WITH_3D_ADAM_MODEL)
# Windows includes # Windows includes
if (WIN32) if (WIN32)
...@@ -861,7 +863,7 @@ if (WITH_3D_ADAM_MODEL) ...@@ -861,7 +863,7 @@ if (WITH_3D_ADAM_MODEL)
${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${GLEW_LIBRARY} ${FREE_IMAGE_LIBRARY}) ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${GLEW_LIBRARY} ${FREE_IMAGE_LIBRARY})
endif (WITH_3D_ADAM_MODEL) endif (WITH_3D_ADAM_MODEL)
if (WITH_3D_RENDERER) 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) endif (WITH_3D_RENDERER)
if (WITH_CERES) if (WITH_CERES)
set(OpenPose_3rdparty_libraries ${OpenPose_3rdparty_libraries} ${CERES_LIBRARIES}) set(OpenPose_3rdparty_libraries ${OpenPose_3rdparty_libraries} ${CERES_LIBRARIES})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册