cmake: Improve compiler flag detection

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-08-20 15:17:09 +02:00
parent 26a4097742
commit a9a99fb31f
8 changed files with 139 additions and 1 deletions

View File

@@ -295,6 +295,7 @@ if (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS})
target_compile_options(${LIBSSH_SHARED_LIBRARY} PRIVATE ${DEFAULT_C_COMPILE_FLAGS})
target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES})
@@ -342,6 +343,7 @@ install(
if (BUILD_STATIC_LIB)
add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS})
target_compile_options(${LIBSSH_STATIC_LIBRARY} PRIVATE ${DEFAULT_C_COMPILE_FLAGS})
if (MSVC)
set(OUTPUT_SUFFIX static)