Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ tags
libssh2.pc
TAGS
*~
.DS_Store
build/
8 changes: 8 additions & 0 deletions .tipi/opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(CRYPTO_BACKEND "OpenSSL" CACHE STRING "crypto backend" FORCE)
set(ENABLE_ZLIB_COMPRESSION ON CACHE BOOL "Enable zlib compression" FORCE)

# Examples
set(BUILD_EXAMPLES OFF CACHE BOOL "no example" FORCE)

# Tests
set(BUILD_TESTING OFF CACHE BOOL "no test" FORCE)
10 changes: 10 additions & 0 deletions .tipi/opts.vs-16-2019-win64-cxx17
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
add_compile_definitions(
NOMINMAX
WIN32_LEAN_AND_MEAN
_WIN32_WINNT=0x0A00 # We have to set the windows version targeted
WINVER=0x0A00 # We have to set the windows version targeted
)

add_compile_options(
/bigobj
)
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
# OF SUCH DAMAGE.

cmake_minimum_required(VERSION 2.8.11)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
cmake_minimum_required(VERSION 3.17.0)
##### PLATFORM deps #####
set(HUNTER_ROOT $ENV{HUNTER_ROOT})
include(HunterGate)
HunterGate(
URL "unused"
SHA1 "unused"
)
##### PLATFORM deps #####

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

project(libssh2 C)
set(PROJECT_URL "https://www.libssh2.org/")
Expand Down
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ include(CheckNonblockingSocketSupport)
include(SocketLibraries)

## Cryptography backend choice
hunter_add_package(OpenSSL COMPONENTS )
hunter_add_package(ZLIB COMPONENTS)



set(CRYPTO_BACKEND
""
Expand Down Expand Up @@ -211,7 +215,7 @@ set(SOURCES
userauth.h
version.c)

if(WIN32)
if(WIN32 AND BUILD_SHARED_LIBS)
list(APPEND SOURCES ${PROJECT_SOURCE_DIR}/win32/libssh2.rc)
endif()

Expand Down