Skip to content

Commit

Permalink
Add an option to disable the application delegate on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
darbyjohnston committed Jan 29, 2024
1 parent c70522d commit 2e192cb
Show file tree
Hide file tree
Showing 3 changed files with 709 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/SuperBuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ project(tlRender-SuperBuild)
set(TLRENDER_PYTHON FALSE CACHE BOOL "Enable Python support (for OTIO Python adapters)")
set(TLRENDER_API "GL_4_1" CACHE STRING "Graphics API (GL_4_1, GL_4_1_Debug, GLES_2)")
set(TLRENDER_GLFW TRUE CACHE BOOL "Enable support for GLFW")
set(TLRENDER_GLFW_DISABLE_MACOS_APP_DELEGATE FALSE CACHE BOOL "Disable the GLFW application delegate on macOS")
set(TLRENDER_NET FALSE CACHE BOOL "Enable network support")
set(TLRENDER_OCIO TRUE CACHE BOOL "Enable support for OpenColorIO")
set(TLRENDER_AUDIO TRUE CACHE BOOL "Enable support for audio")
Expand Down
9 changes: 9 additions & 0 deletions etc/SuperBuild/cmake/Modules/Buildglfw3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ include(ExternalProject)
set(glfw3_GIT_REPOSITORY "https://github.com/glfw/glfw.git")
set(glfw3_GIT_TAG "3eaf1255b29fdf5c2895856c7be7d7185ef2b241")

set(glfw3_PATCH)
if(TLRENDER_GLFW_DISABLE_MACOS_APP_DELEGATE)
set(glfw3_PATCH
${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/glfw3-patch/src/cocoa_init.m
${CMAKE_CURRENT_BINARY_DIR}/glfw3/src/glfw3/src/cocoa_init.m)
endif()

set(glfw3_ARGS
${TLRENDER_EXTERNAL_ARGS}
-DCMAKE_INSTALL_LIBDIR=lib
Expand All @@ -16,6 +24,7 @@ ExternalProject_Add(
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glfw3
GIT_REPOSITORY ${glfw3_GIT_REPOSITORY}
GIT_TAG ${glfw3_GIT_TAG}
PATCH_COMMAND ${glfw3_PATCH}
LIST_SEPARATOR |
CMAKE_ARGS ${glfw3_ARGS})

Loading

0 comments on commit 2e192cb

Please sign in to comment.