summaryrefslogtreecommitdiff
path: root/Modules/FindGLEW.cmake
diff options
context:
space:
mode:
authorClaudio Fantacci <claudio.fantacci@gmail.com>2019-08-06 12:55:52 +0200
committerBrad King <brad.king@kitware.com>2019-08-06 09:47:35 -0400
commita8a3efa3be3ec6162495abc0ec0d6721a9fcdf5e (patch)
tree5d5f26ceebcda0398eceac400d88d1fc01900afd /Modules/FindGLEW.cmake
parentf43a7d76c737c5bb9b903a2b1be5186c081ec21e (diff)
downloadcmake-a8a3efa3be3ec6162495abc0ec0d6721a9fcdf5e.tar.gz
FindGLEW: Fix macOS library suffix selection
Fix logic added by commit a7d853868b (FindGLEW: Update implementation, 2019-03-13, v3.15.0-rc1~375^2~1) on macOS. macOS is recognized as both UNIX and APPLE. Consequently, the library suffix for shared and static library was set, respectively, as `.so` and `.a`, just like UNIX systems. Fix this by properly checking the OS type. Fixes: #19542
Diffstat (limited to 'Modules/FindGLEW.cmake')
-rw-r--r--Modules/FindGLEW.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindGLEW.cmake b/Modules/FindGLEW.cmake
index 2e9a052390..18320b449b 100644
--- a/Modules/FindGLEW.cmake
+++ b/Modules/FindGLEW.cmake
@@ -72,9 +72,9 @@ endif()
function(__glew_set_find_library_suffix shared_or_static)
- if(UNIX AND "${shared_or_static}" MATCHES "SHARED")
+ if((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "SHARED")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" PARENT_SCOPE)
- elseif(UNIX AND "${shared_or_static}" MATCHES "STATIC")
+ elseif((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "STATIC")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
elseif(APPLE AND "${shared_or_static}" MATCHES "SHARED")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so" PARENT_SCOPE)