mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
Link shared libraries with --as-needed by default.
This commit is contained in:
@@ -46,6 +46,9 @@ if (UNIX AND NOT WIN32)
|
||||
if (WITH_FORTIFY_SOURCE)
|
||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
||||
endif (WITH_FORTIFY_SOURCE)
|
||||
|
||||
# Set linker flags
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
|
||||
endif (CMAKE_COMPILER_IS_GNUCC)
|
||||
endif (UNIX AND NOT WIN32)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user