mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 11:10:28 +09:00
cmake: Fix the build on Windows.
(cherry picked from commit a738507ad2)
This commit is contained in:
@@ -53,11 +53,12 @@ include_directories(
|
|||||||
${LIBSSH_THREADS_PRIVATE_INCLUDE_DIRS}
|
${LIBSSH_THREADS_PRIVATE_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
|
if (libssh_threads_SRCS)
|
||||||
|
add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
|
||||||
|
|
||||||
target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})
|
target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})
|
||||||
|
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
${LIBSSH_THREADS_SHARED_LIBRARY}
|
${LIBSSH_THREADS_SHARED_LIBRARY}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION
|
VERSION
|
||||||
@@ -68,22 +69,22 @@ set_target_properties(
|
|||||||
ssh_threads
|
ssh_threads
|
||||||
DEFINE_SYMBOL
|
DEFINE_SYMBOL
|
||||||
LIBSSH_EXPORTS
|
LIBSSH_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WITH_VISIBILITY_HIDDEN)
|
if (WITH_VISIBILITY_HIDDEN)
|
||||||
set_target_properties(${LIBSSH_THREADS_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
|
set_target_properties(${LIBSSH_THREADS_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
|
||||||
endif (WITH_VISIBILITY_HIDDEN)
|
endif (WITH_VISIBILITY_HIDDEN)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
${LIBSSH_THREADS_SHARED_LIBRARY}
|
${LIBSSH_THREADS_SHARED_LIBRARY}
|
||||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||||
COMPONENT libraries
|
COMPONENT libraries
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WITH_STATIC_LIB)
|
if (WITH_STATIC_LIB)
|
||||||
add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS})
|
add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS})
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
@@ -122,4 +123,5 @@ if (WITH_STATIC_LIB)
|
|||||||
COMPONENT
|
COMPONENT
|
||||||
libraries
|
libraries
|
||||||
)
|
)
|
||||||
endif (WITH_STATIC_LIB)
|
endif (WITH_STATIC_LIB)
|
||||||
|
endif (libssh_threads_SRCS)
|
||||||
|
|||||||
Reference in New Issue
Block a user