Skip to content

Commit a8a3efa

Browse files
claudiofantaccibradking
authored andcommitted
FindGLEW: Fix macOS library suffix selection
Fix logic added by commit a7d8538 (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
1 parent f43a7d7 commit a8a3efa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/FindGLEW.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ endif()
7272

7373

7474
function(__glew_set_find_library_suffix shared_or_static)
75-
if(UNIX AND "${shared_or_static}" MATCHES "SHARED")
75+
if((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "SHARED")
7676
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" PARENT_SCOPE)
77-
elseif(UNIX AND "${shared_or_static}" MATCHES "STATIC")
77+
elseif((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "STATIC")
7878
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
7979
elseif(APPLE AND "${shared_or_static}" MATCHES "SHARED")
8080
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so" PARENT_SCOPE)

0 commit comments

Comments
 (0)