mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
cmake: Only install static lib if built WITH_STATIC_LIB
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -29,8 +29,12 @@ if(WITH_BENCHMARKS)
|
|||||||
set(UNIT_TESTING ON)
|
set(UNIT_TESTING ON)
|
||||||
endif(WITH_BENCHMARKS)
|
endif(WITH_BENCHMARKS)
|
||||||
|
|
||||||
|
if (WITH_STATIC_LIB)
|
||||||
|
set(BUILD_STATIC_LIB ON)
|
||||||
|
endif (WITH_STATIC_LIB)
|
||||||
|
|
||||||
if (UNIT_TESTING)
|
if (UNIT_TESTING)
|
||||||
set(WITH_STATIC_LIB ON)
|
set(BUILD_STATIC_LIB ON)
|
||||||
endif (UNIT_TESTING)
|
endif (UNIT_TESTING)
|
||||||
|
|
||||||
if (WITH_NACL)
|
if (WITH_NACL)
|
||||||
|
@ -106,12 +106,12 @@ set(LIBSSH_SHARED_LIBRARY
|
|||||||
CACHE INTERNAL "libssh shared library"
|
CACHE INTERNAL "libssh shared library"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WITH_STATIC_LIB)
|
if (BUILD_STATIC_LIB)
|
||||||
set(LIBSSH_STATIC_LIBRARY
|
set(LIBSSH_STATIC_LIBRARY
|
||||||
ssh_static
|
ssh_static
|
||||||
CACHE INTERNAL "libssh static library"
|
CACHE INTERNAL "libssh static library"
|
||||||
)
|
)
|
||||||
endif (WITH_STATIC_LIB)
|
endif (BUILD_STATIC_LIB)
|
||||||
|
|
||||||
set(libssh_SRCS
|
set(libssh_SRCS
|
||||||
agent.c
|
agent.c
|
||||||
@ -340,7 +340,7 @@ install(
|
|||||||
COMPONENT libraries
|
COMPONENT libraries
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WITH_STATIC_LIB)
|
if (BUILD_STATIC_LIB)
|
||||||
add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS})
|
add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS})
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
@ -370,14 +370,14 @@ if (WITH_STATIC_LIB)
|
|||||||
)
|
)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
install(
|
if (WITH_STATIC_LIB)
|
||||||
TARGETS
|
install(TARGETS
|
||||||
${LIBSSH_STATIC_LIBRARY}
|
${LIBSSH_STATIC_LIBRARY}
|
||||||
DESTINATION
|
DESTINATION
|
||||||
${LIB_INSTALL_DIR}/${OUTPUT_SUFFIX}
|
${LIB_INSTALL_DIR}/${OUTPUT_SUFFIX}
|
||||||
COMPONENT
|
COMPONENT
|
||||||
libraries
|
libraries)
|
||||||
)
|
endif (WITH_STATIC_LIB)
|
||||||
endif (WITH_STATIC_LIB)
|
endif (BUILD_STATIC_LIB)
|
||||||
|
|
||||||
message(STATUS "Threads_FOUND=${Threads_FOUND}")
|
message(STATUS "Threads_FOUND=${Threads_FOUND}")
|
||||||
|
Reference in New Issue
Block a user