diff options
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | cmake/Modules/DefineInstallationPaths.cmake | 15 | ||||
-rw-r--r-- | libssh/CMakeLists.txt | 7 |
3 files changed, 21 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 59422478..46fd3aa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,8 +59,10 @@ add_subdirectory(libssh) # build samples include_directories(${CMAKE_SOURCE_DIR}/include) -add_executable(samplessh sample.c) -add_executable(samplesshd samplesshd.c) +if (UNIX AND NOT WIN32) + add_executable(samplessh sample.c) + add_executable(samplesshd samplesshd.c) -target_link_libraries(samplessh ${LIBSSH_LIBRARY}) -target_link_libraries(samplesshd ${LIBSSH_LIBRARY}) + target_link_libraries(samplessh ${LIBSSH_LIBRARY}) + target_link_libraries(samplesshd ${LIBSSH_LIBRARY}) +endif (UNIX AND NOT WIN32) diff --git a/cmake/Modules/DefineInstallationPaths.cmake b/cmake/Modules/DefineInstallationPaths.cmake index 5c4caf72..15f2f481 100644 --- a/cmake/Modules/DefineInstallationPaths.cmake +++ b/cmake/Modules/DefineInstallationPaths.cmake @@ -112,13 +112,14 @@ endif (UNIX) if (WIN32) # Same same - SET(BIN_INSTALL_DIR .) - SET(SBIN_INSTALL_DIR .) - SET(LIB_INSTALL_DIR .) - SET(PLUGIN_INSTALL_DIR plugins) + SET(BIN_INSTALL_DIR bin) + SET(SBIN_INSTALL_DIR bin) + SET(LIB_INSTALL_DIR lib) + SET(INCLUDE_INSTALL_DIR include) + SET(PLUGIN_INSTALL_DIR bin) SET(HTML_INSTALL_DIR doc/HTML) - SET(ICON_INSTALL_DIR .) - SET(SOUND_INSTALL_DIR .) - SET(LOCALE_INSTALL_DIR lang) + SET(ICON_INSTALL_DIR bin) + SET(SOUND_INSTALL_DIR bin) + SET(LOCALE_INSTALL_DIR bin) endif (WIN32) diff --git a/libssh/CMakeLists.txt b/libssh/CMakeLists.txt index 62bf4b92..62ee95ef 100644 --- a/libssh/CMakeLists.txt +++ b/libssh/CMakeLists.txt @@ -22,6 +22,13 @@ set(LIBSSH_LINK_LIBRARIES ${ZLIB_LIBRARIES} ) +if (WIN32) + set(LIBSSH_LINK_LIBRARIES + ${LIBSSH_LINK_LIBRARIES} + ws2_32 + ) +endif (WIN32) + if (CRYPTO_LIBRARY) set(LIBSSH_PRIVATE_INCLUDE_DIRS ${LIBSSH_PRIVATE_INCLUDE_DIRS} |