mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
cmake: Update defaults
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -1,6 +1,14 @@
|
|||||||
cmake_minimum_required(VERSION 3.3.0)
|
cmake_minimum_required(VERSION 3.3.0)
|
||||||
cmake_policy(SET CMP0048 NEW)
|
cmake_policy(SET CMP0048 NEW)
|
||||||
|
|
||||||
|
# Specify search path for CMake modules to be loaded by include()
|
||||||
|
# and find_package()
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
|
||||||
|
|
||||||
|
# Add defaults for cmake
|
||||||
|
# Those need to be set before the project() call.
|
||||||
|
include(DefineCMakeDefaults)
|
||||||
|
|
||||||
project(libssh VERSION 0.8.90 LANGUAGES C)
|
project(libssh VERSION 0.8.90 LANGUAGES C)
|
||||||
|
|
||||||
# global needed variable
|
# global needed variable
|
||||||
@@ -17,12 +25,8 @@ set(LIBRARY_VERSION "4.6.0")
|
|||||||
set(LIBRARY_SOVERSION "4")
|
set(LIBRARY_SOVERSION "4")
|
||||||
|
|
||||||
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
||||||
set(CMAKE_MODULE_PATH
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
|
|
||||||
)
|
|
||||||
|
|
||||||
# add definitions
|
# add definitions
|
||||||
include(DefineCMakeDefaults)
|
|
||||||
include(DefinePlatformDefaults)
|
include(DefinePlatformDefaults)
|
||||||
include(DefineInstallationPaths)
|
include(DefineInstallationPaths)
|
||||||
include(DefineOptions.cmake)
|
include(DefineOptions.cmake)
|
||||||
|
|||||||
@@ -14,17 +14,5 @@ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
|||||||
# since cmake 2.4.0
|
# since cmake 2.4.0
|
||||||
set(CMAKE_COLOR_MAKEFILE ON)
|
set(CMAKE_COLOR_MAKEFILE ON)
|
||||||
|
|
||||||
# Define the generic version of the libraries here
|
|
||||||
set(GENERIC_LIB_VERSION "0.1.0")
|
|
||||||
set(GENERIC_LIB_SOVERSION "0")
|
|
||||||
|
|
||||||
# Set the default build type to release with debug info
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
|
||||||
set(CMAKE_BUILD_TYPE RelWithDebInfo
|
|
||||||
CACHE STRING
|
|
||||||
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
|
||||||
)
|
|
||||||
endif (NOT CMAKE_BUILD_TYPE)
|
|
||||||
|
|
||||||
# Create the compile command database for clang by default
|
# Create the compile command database for clang by default
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|||||||
Reference in New Issue
Block a user