aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-08-14 20:28:45 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-08-14 20:28:45 +0000
commitb8079a1830eae2bda2eeadaf7f2ebf6cff173391 (patch)
tree0f9db7e1a0dffa1e780f45071a4a651e41ff2682 /modules
parentc362b85b1b3ae1cf41d8451b6397e81426368a4a (diff)
downloadextra-cmake-modules-b8079a1830eae2bda2eeadaf7f2ebf6cff173391.tar.gz
extra-cmake-modules-b8079a1830eae2bda2eeadaf7f2ebf6cff173391.tar.bz2
add a switch to disable all optional dirs initially, e.g. for building only one of all the subdirs (requested by Saro)
Alex CCMAIL: ps_ml@gmx.de svn path=/trunk/KDE/kdelibs/; revision=847137
Diffstat (limited to 'modules')
-rw-r--r--modules/MacroOptionalAddSubdirectory.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/MacroOptionalAddSubdirectory.cmake b/modules/MacroOptionalAddSubdirectory.cmake
index b0d565c2..9566bb4c 100644
--- a/modules/MacroOptionalAddSubdirectory.cmake
+++ b/modules/MacroOptionalAddSubdirectory.cmake
@@ -19,7 +19,11 @@
MACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir )
GET_FILENAME_COMPONENT(_fullPath ${_dir} ABSOLUTE)
IF(EXISTS ${_fullPath})
- OPTION(BUILD_${_dir} "Build directory ${_dir}" TRUE)
+ SET(_DEFAULT_OPTION_VALUE TRUE)
+ IF(DISABLE_ALL_OPTIONAL_SUBDIRS)
+ SET(_DEFAULT_OPTION_VALUE FALSE)
+ ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRS)
+ OPTION(BUILD_${_dir} "Build directory ${_dir}" ${_DEFAULT_OPTION_VALUE})
IF(BUILD_${_dir})
ADD_SUBDIRECTORY(${_dir})
ENDIF(BUILD_${_dir})