Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiha <miha.ravselj@ib-caddy.si>2014-03-03 15:08:17 +0400
committerMiha <miha.ravselj@ib-caddy.si>2014-03-03 15:08:17 +0400
commit6874cafd84b70f6f83fdcf81e55f87c8d62bb07e (patch)
treec8759711b06d7ea996c2dd54fa327b49e849f3ee /examples
parent058956ce7f76c0955a8aea77831a22838ec3ede4 (diff)
cmake examples change so that general.c is off by default
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 596be45ed..d3908e0ff 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -6,10 +6,14 @@ ELSE()
TARGET_LINK_LIBRARIES(cgit2 git2 pthread)
ENDIF()
+OPTION( BUILD_EXAMPLES_GENERAL "Build general example" OFF )
+
FILE(GLOB SRC_EXAMPLE_APPS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c)
FOREACH(src_app ${SRC_EXAMPLE_APPS})
STRING(REPLACE ".c" "" app_name ${src_app})
- IF(NOT ${app_name} STREQUAL "common")
+ IF(${app_name} STREQUAL "general" AND BUILD_EXAMPLES_GENERAL OR
+ NOT ${app_name} STREQUAL "general" AND NOT ${app_name} STREQUAL "common"
+ )
ADD_EXECUTABLE(${app_name} ${src_app} "common.c")
TARGET_LINK_LIBRARIES(${app_name} git2)
ENDIF()