diff options
author | Brad King <brad.king@kitware.com> | 2020-12-14 12:10:29 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-12-14 12:11:07 (GMT) |
commit | 528fbd61b7c8f76ba8bf2454fb266bae561a8909 (patch) | |
tree | f1a8716724ff644bfb3eeca1050a7a02a91e6403 /Modules/FindGLUT.cmake | |
parent | 33a8a4adffad8a91c347bd2a2fdd832808c136c8 (diff) | |
parent | d29d034e2e1a867bf769529b5f5f20090402f469 (diff) | |
download | CMake-528fbd61b7c8f76ba8bf2454fb266bae561a8909.zip CMake-528fbd61b7c8f76ba8bf2454fb266bae561a8909.tar.gz CMake-528fbd61b7c8f76ba8bf2454fb266bae561a8909.tar.bz2 |
Merge topic 'FindGLUT-macos-tbd'
d29d034e2e FindGLUT: Handle Mojave and Big Sur 'tbd' framework files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5601
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 c81d971..2770c60 100644 --- a/Modules/FindGLUT.cmake +++ b/Modules/FindGLUT.cmake @@ -69,8 +69,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}") @@ -151,8 +155,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 |