Skip to content

CMake avplay: do not build the app if OpenGL or GLUT are not found #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions app/cpp/avplay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(AvTranscoderMacros)

# Build app
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
# Check OpenGL
find_package(OpenGL)
if(NOT OPENGL_FOUND)
message("OpenGL not found, will not build avplay app.")
return()
endif()

# Check GLUT
find_package(GLUT)
if(NOT GLUT_FOUND)
message("GLUT not found, will not build avplay app.")
return()
endif()

# Build app
include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR})
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} )

Expand Down