summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-09-16 08:21:12 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-10-01 14:47:57 +0200
commit44f851d2876fad4907cde1eec8ba6f4801de846e (patch)
treecb5d4d4418ecc91ba3e1f5f5cd84a811b29a6715
parent3d158fffa0ba78ffd517da941fd0ff1ba908d796 (diff)
cmake: Allow to build without examples.
BUG: https://red.libssh.org/issues/114
-rw-r--r--CMakeLists.txt4
-rw-r--r--DefineOptions.cmake1
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14175969..d0520e7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,7 +109,9 @@ install(
# in tree build settings
configure_file(libssh-build-tree-settings.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libssh-build-tree-settings.cmake @ONLY)
-add_subdirectory(examples)
+if (WITH_EXAMPLES)
+ add_subdirectory(examples)
+endif (WITH_EXAMPLES)
if (WITH_TESTING)
find_package(CMocka REQUIRED)
diff --git a/DefineOptions.cmake b/DefineOptions.cmake
index 6913f040..756b948a 100644
--- a/DefineOptions.cmake
+++ b/DefineOptions.cmake
@@ -12,6 +12,7 @@ option(WITH_INTERNAL_DOC "Compile doxygen internal documentation" OFF)
option(WITH_TESTING "Build with unit tests" OFF)
option(WITH_CLIENT_TESTING "Build with client tests; requires a running sshd" OFF)
option(WITH_BENCHMARKS "Build benchmarks tools" OFF)
+option(WITH_EXAMPLES "Build examples" ON)
if (WITH_ZLIB)
set(WITH_LIBZ ON)