Skip to content

Commit

Permalink
cmake: move option descriptions next to definition
Browse files Browse the repository at this point in the history
Cherry-picked from libssh2#1017
  • Loading branch information
vszakats committed May 3, 2023
1 parent d964289 commit ec8689b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ include(CheckSymbolExists)
include(CheckIncludeFiles)
include(CheckSymbolExists)
include(CMakePushCheckState)
include(FeatureSummary)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
include(CheckFunctionExistsMayNeedLibrary)
Expand All @@ -50,7 +51,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
project(libssh2 C)

option(BUILD_STATIC_LIBS "Build Static Libraries" ON)
add_feature_info("Static library" BUILD_STATIC_LIBS
"creating libssh2 static library")

option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
add_feature_info("Shared library" BUILD_SHARED_LIBS
"creating libssh2 shared library (.so/.dll)")

# Parse version

Expand Down Expand Up @@ -90,7 +96,6 @@ if(MSVC)
endif()

include(max_warnings)
include(FeatureSummary)

# Add socket libraries
if(WIN32)
Expand Down
6 changes: 0 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ if(NOT CLEAR_MEMORY)
list(APPEND libssh2_DEFINITIONS LIBSSH2_NO_CLEAR_MEMORY)
endif()

add_feature_info("Static library" BUILD_STATIC_LIBS
"creating libssh2 static library")

add_feature_info("Shared library" BUILD_SHARED_LIBS
"creating libssh2 shared library (.so/.dll)")

option(ENABLE_ZLIB_COMPRESSION "Use zlib for compression")
add_feature_info(Compression ENABLE_ZLIB_COMPRESSION
"using zlib for compression")
Expand Down

0 comments on commit ec8689b

Please sign in to comment.