diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-30 21:20:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-30 21:20:29 -0500 |
commit | 46885ac9a4f1b503d00be2c49a29717f3964a465 (patch) | |
tree | dec16b042d36883fdcd8acbae4b77615e969e9fc | |
parent | 84e1e560cf4e8b0c73b29707916dccb710e2fda2 (diff) | |
parent | be320340edaaf6e065bd3b7de2791e2c01b222c4 (diff) | |
download | libgit2-46885ac9a4f1b503d00be2c49a29717f3964a465.tar.gz |
Merge pull request #6153 from arroz/fix/apple-static-lib
Disabling setting `CMAKE_FIND_LIBRARY_SUFFIXES` on Apple platforms.
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | cmake/DefaultCFlags.cmake | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -301,6 +301,8 @@ compiler and linker. These flags are rarely used but can be useful for - `CMAKE_FIND_ROOT_PATH`: Override the search path for libraries - `ZLIB_LIBRARY`, `OPENSSL_SSL_LIBRARY` AND `OPENSSL_CRYPTO_LIBRARY`: Tell CMake where to find those specific libraries +- `LINK_WITH_STATIC_LIBRARIES`: Link only with static versions of +system libraries MacOS X ------- diff --git a/cmake/DefaultCFlags.cmake b/cmake/DefaultCFlags.cmake index fa59e1d97..a9c9ab972 100644 --- a/cmake/DefaultCFlags.cmake +++ b/cmake/DefaultCFlags.cmake @@ -92,7 +92,7 @@ else() set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -D <TARGET>") endif() - if(NOT BUILD_SHARED_LIBS) + if(NOT BUILD_SHARED_LIBS AND LINK_WITH_STATIC_LIBRARIES) set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") endif() |