| CMakeLists.txt | CMakeLists.txt | |||
|---|---|---|---|---|
| project(libssh C) | project(libssh C) | |||
| # Required cmake version | # Required cmake version | |||
| cmake_minimum_required(VERSION 2.6.0) | cmake_minimum_required(VERSION 2.6.0) | |||
| # global needed variables | # global needed variables | |||
| set(APPLICATION_NAME ${PROJECT_NAME}) | set(APPLICATION_NAME ${PROJECT_NAME}) | |||
| set(APPLICATION_VERSION "0.3.4") | set(APPLICATION_VERSION "0.4.0") | |||
| set(APPLICATION_VERSION_MAJOR "0") | set(APPLICATION_VERSION_MAJOR "0") | |||
| set(APPLICATION_VERSION_MINOR "3") | set(APPLICATION_VERSION_MINOR "4") | |||
| set(APPLICATION_VERSION_PATCH "4") | set(APPLICATION_VERSION_PATCH "0") | |||
| set(LIBRARY_VERSION "3.4.0") | set(LIBRARY_VERSION "4.0.0") | |||
| set(LIBRARY_SOVERSION "3") | set(LIBRARY_SOVERSION "4") | |||
| # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is c hecked | # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is c hecked | |||
| set(CMAKE_MODULE_PATH | set(CMAKE_MODULE_PATH | |||
| ${CMAKE_SOURCE_DIR}/cmake/Modules | ${CMAKE_SOURCE_DIR}/cmake/Modules | |||
| ) | ) | |||
| # add definitions | # add definitions | |||
| include(DefineCMakeDefaults) | include(DefineCMakeDefaults) | |||
| include(DefineCompilerFlags) | include(DefineCompilerFlags) | |||
| include(DefineInstallationPaths) | include(DefineInstallationPaths) | |||
| skipping to change at line 41 | skipping to change at line 41 | |||
| include(MacroEnsureOutOfSourceBuild) | include(MacroEnsureOutOfSourceBuild) | |||
| macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${ PROJECT_NAME} [options]' there.") | macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${ PROJECT_NAME} [options]' there.") | |||
| # add macros | # add macros | |||
| include(MacroAddPlugin) | include(MacroAddPlugin) | |||
| include(MacroCopyFile) | include(MacroCopyFile) | |||
| # search for libraries | # search for libraries | |||
| find_package(ZLIB REQUIRED) | find_package(ZLIB REQUIRED) | |||
| find_package(OpenSSL) | if (WITH_GCRYPT) | |||
| find_package(GCrypt REQUIRED) | ||||
| if (NOT CRYPTO_FOUND) | ||||
| find_package(GCrypt) | ||||
| if (NOT GCRYPT_FOUND) | if (NOT GCRYPT_FOUND) | |||
| message(FATAL_ERROR "Could not find OpenSSL or GCrypt") | message(FATAL_ERROR "Could not find GCrypt") | |||
| endif (NOT GCRYPT_FOUND) | endif (NOT GCRYPT_FOUND) | |||
| endif (NOT CRYPTO_FOUND) | else (WITH_GCRYPT) | |||
| find_package(OpenSSL) | ||||
| if (NOT CRYPTO_FOUND) | ||||
| find_package(GCrypt) | ||||
| if (NOT GCRYPT_FOUND) | ||||
| message(FATAL_ERROR "Could not find OpenSSL or GCrypt") | ||||
| endif (NOT GCRYPT_FOUND) | ||||
| endif (NOT CRYPTO_FOUND) | ||||
| endif(WITH_GCRYPT) | ||||
| # config.h checks | # config.h checks | |||
| include(ConfigureChecks.cmake) | include(ConfigureChecks.cmake) | |||
| configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) | configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) | |||
| # check subdirectories | # check subdirectories | |||
| add_subdirectory(doc) | add_subdirectory(doc) | |||
| add_subdirectory(include) | add_subdirectory(include) | |||
| add_subdirectory(libssh) | add_subdirectory(libssh) | |||
| add_subdirectory(tests) | ||||
| # build samples | # build samples | |||
| include_directories(${CMAKE_SOURCE_DIR}/include) | include_directories(${CMAKE_SOURCE_DIR}/include) | |||
| if (UNIX AND NOT WIN32) | if (UNIX AND NOT WIN32) | |||
| if (WITH_SFTP AND WITH_SERVER) | add_subdirectory(examples) | |||
| add_executable(samplessh sample.c) | ||||
| add_executable(samplesshd samplesshd.c) | ||||
| target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY}) | ||||
| target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY}) | ||||
| endif (WITH_SFTP AND WITH_SERVER) | ||||
| endif (UNIX AND NOT WIN32) | endif (UNIX AND NOT WIN32) | |||
| End of changes. 8 change blocks. | ||||
| 18 lines changed or deleted | 20 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||