Skip to content

Commit be32034

Browse files
committed
Introduced LINK_WITH_STATIC_LIBRARIES per PR comments.
1 parent 7c9f77b commit be32034

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ compiler and linker. These flags are rarely used but can be useful for
301301
- `CMAKE_FIND_ROOT_PATH`: Override the search path for libraries
302302
- `ZLIB_LIBRARY`, `OPENSSL_SSL_LIBRARY` AND `OPENSSL_CRYPTO_LIBRARY`:
303303
Tell CMake where to find those specific libraries
304+
- `LINK_WITH_STATIC_LIBRARIES`: Link only with static versions of
305+
system libraries
304306

305307
MacOS X
306308
-------

cmake/DefaultCFlags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ else()
9292
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -D <TARGET>")
9393
endif()
9494

95-
if(NOT APPLE AND NOT BUILD_SHARED_LIBS)
95+
if(NOT BUILD_SHARED_LIBS AND LINK_WITH_STATIC_LIBRARIES)
9696
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
9797
endif()
9898

0 commit comments

Comments
 (0)