Skip to content

Commit

Permalink
Add an option to force vendored GLFW and GLEW
Browse files Browse the repository at this point in the history
  • Loading branch information
linkmauve committed Oct 6, 2018
1 parent bdfd99e commit 196c2dd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ option(BONZOMATIC_NDI "Enable NDI?" OFF)

option(BONZOMATIC_TOUCHBAR "Compile with macOS TouchBar support (Xcode 9 or newer required)?" ON)

option(BONZOMATIC_EXTERNAL_GLFW "Use the vendored version of GLFW even if it is installed?" OFF)
option(BONZOMATIC_EXTERNAL_GLEW "Use the vendored version of GLEW even if it is installed?" OFF)

set(BONZOMATIC_WINDOWS_FLAVOR "DX11" CACHE STRING "Windows renderer flavor selected at CMake configure time (DX11, DX9 or GLFW)")
set_property(CACHE BONZOMATIC_WINDOWS_FLAVOR PROPERTY STRINGS DX11 DX9 GLFW)

Expand Down Expand Up @@ -67,7 +70,7 @@ if (APPLE OR UNIX OR (WIN32 AND (${BONZOMATIC_WINDOWS_FLAVOR} MATCHES "GLFW")))
# GLFW settings and project inclusion
find_package(PkgConfig)
pkg_check_modules(GLFW glfw3>=3.3)
if (GLFW_FOUND)
if (GLFW_FOUND AND NOT BONZOMATIC_EXTERNAL_GLFW)
set(BZC_PROJECT_INCLUDES ${BZC_PROJECT_INCLUDES} ${GLFW_INCLUDES})
set(BZC_PROJECT_LIBS ${BZC_PROJECT_LIBS} ${GLFW_LIBRARIES})
else()
Expand All @@ -93,7 +96,7 @@ if (APPLE OR UNIX OR (WIN32 AND (${BONZOMATIC_WINDOWS_FLAVOR} MATCHES "GLFW")))
##############################################################################
# GLEW
pkg_check_modules(GLEW glew)
if (GLEW_FOUND)
if (GLEW_FOUND AND NOT BONZOMATIC_EXTERNAL_GLEW)
set(BZC_PROJECT_INCLUDES ${BZC_PROJECT_INCLUDES} ${GLEW_INCLUDES})
set(BZC_PROJECT_LIBS ${BZC_PROJECT_LIBS} ${GLEW_LIBRARIES})
else ()
Expand Down

0 comments on commit 196c2dd

Please sign in to comment.