mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 15:32:10 +08:00
FindGLUT: Handle Mojave and Big Sur 'tbd' framework files
This commit is contained in:

committed by
Brad King

parent
0334a3c68f
commit
d29d034e2e
@@ -64,8 +64,12 @@ else ()
|
|||||||
add_library(GLUT::Cocoa UNKNOWN IMPORTED)
|
add_library(GLUT::Cocoa UNKNOWN IMPORTED)
|
||||||
# Cocoa should always be a Framework, but we check to make sure.
|
# Cocoa should always be a Framework, but we check to make sure.
|
||||||
if(GLUT_cocoa_LIBRARY MATCHES "/([^/]+)\\.framework$")
|
if(GLUT_cocoa_LIBRARY MATCHES "/([^/]+)\\.framework$")
|
||||||
|
set(_glut_cocoa "${GLUT_cocoa_LIBRARY}/${CMAKE_MATCH_1}")
|
||||||
|
if(EXISTS "${_glut_cocoa}.tbd")
|
||||||
|
string(APPEND _glut_cocoa ".tbd")
|
||||||
|
endif()
|
||||||
set_target_properties(GLUT::Cocoa PROPERTIES
|
set_target_properties(GLUT::Cocoa PROPERTIES
|
||||||
IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}/${CMAKE_MATCH_1}")
|
IMPORTED_LOCATION "${_glut_cocoa}")
|
||||||
else()
|
else()
|
||||||
set_target_properties(GLUT::Cocoa PROPERTIES
|
set_target_properties(GLUT::Cocoa PROPERTIES
|
||||||
IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}")
|
IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}")
|
||||||
@@ -146,8 +150,12 @@ if (GLUT_FOUND)
|
|||||||
set_target_properties(GLUT::GLUT PROPERTIES
|
set_target_properties(GLUT::GLUT PROPERTIES
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${GLUT_INCLUDE_DIR}")
|
INTERFACE_INCLUDE_DIRECTORIES "${GLUT_INCLUDE_DIR}")
|
||||||
if(GLUT_glut_LIBRARY MATCHES "/([^/]+)\\.framework$")
|
if(GLUT_glut_LIBRARY MATCHES "/([^/]+)\\.framework$")
|
||||||
|
set(_glut_glut "${GLUT_glut_LIBRARY}/${CMAKE_MATCH_1}")
|
||||||
|
if(EXISTS "${_glut_glut}.tbd")
|
||||||
|
string(APPEND _glut_glut ".tbd")
|
||||||
|
endif()
|
||||||
set_target_properties(GLUT::GLUT PROPERTIES
|
set_target_properties(GLUT::GLUT PROPERTIES
|
||||||
IMPORTED_LOCATION "${GLUT_glut_LIBRARY}/${CMAKE_MATCH_1}")
|
IMPORTED_LOCATION "${_glut_glut}")
|
||||||
else()
|
else()
|
||||||
if(GLUT_glut_LIBRARY_RELEASE)
|
if(GLUT_glut_LIBRARY_RELEASE)
|
||||||
set_property(TARGET GLUT::GLUT APPEND PROPERTY
|
set_property(TARGET GLUT::GLUT APPEND PROPERTY
|
||||||
|
Reference in New Issue
Block a user