diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-11-16 15:48:32 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2023-01-10 19:41:13 +0100 |
commit | e41b08292872531535518b20d32b1885db3cce48 (patch) | |
tree | 6a3de6b154124d20e7caabd0dc72f125c76782cb /cmake | |
parent | 6ff7f2e54b80794acd498931adb3fe4096b396bb (diff) | |
download | tigervnc-e41b08292872531535518b20d32b1885db3cce48.tar.gz tigervnc-e41b08292872531535518b20d32b1885db3cce48.zip |
Handle alternative library suffixes
I think this only affects macOS at the moment where they also have .tbd
files for linking.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/CMakeMacroLibtoolFile.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake index 423d3dfb..4f3c9021 100644 --- a/cmake/Modules/CMakeMacroLibtoolFile.cmake +++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake @@ -41,7 +41,15 @@ macro(libtool_create_control_file _target) # Assume all entries are shared libs if platform-specific static library # extension is not matched. elseif(NOT "${library}" MATCHES ".+${CMAKE_STATIC_LIBRARY_SUFFIX}$") - if("${library}" MATCHES ".+${CMAKE_SHARED_LIBRARY_SUFFIX}$") + set(SHARED OFF) + foreach(suffix ${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES}) + if("${library}" MATCHES ".+${suffix}$") + set(SHARED ON) + break() + endif() + endforeach() + + if(SHARED) # Shared library extension matched, so extract the path and library # name, then add the result to the libtool dependency libs. This # will always be an absolute path, because that's what CMake uses |