diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-12-11 10:49:01 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-12-11 11:01:30 -0500 |
commit | d29d034e2e1a867bf769529b5f5f20090402f469 (patch) | |
tree | 75280243618e4efd19da2238db113b71b83494f6 /Modules/FindGLUT.cmake | |
parent | 0334a3c68f1064a7bb1f682d81f03e06f3608893 (diff) | |
download | cmake-d29d034e2e1a867bf769529b5f5f20090402f469.tar.gz |
FindGLUT: Handle Mojave and Big Sur 'tbd' framework files
Diffstat (limited to 'Modules/FindGLUT.cmake')
-rw-r--r-- | Modules/FindGLUT.cmake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake index a22bf5bca8..15561d6b08 100644 --- a/Modules/FindGLUT.cmake +++ b/Modules/FindGLUT.cmake @@ -64,8 +64,12 @@ else () add_library(GLUT::Cocoa UNKNOWN IMPORTED) # Cocoa should always be a Framework, but we check to make sure. 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 - IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}/${CMAKE_MATCH_1}") + IMPORTED_LOCATION "${_glut_cocoa}") else() set_target_properties(GLUT::Cocoa PROPERTIES IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}") @@ -146,8 +150,12 @@ if (GLUT_FOUND) set_target_properties(GLUT::GLUT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLUT_INCLUDE_DIR}") 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 - IMPORTED_LOCATION "${GLUT_glut_LIBRARY}/${CMAKE_MATCH_1}") + IMPORTED_LOCATION "${_glut_glut}") else() if(GLUT_glut_LIBRARY_RELEASE) set_property(TARGET GLUT::GLUT APPEND PROPERTY |