summaryrefslogtreecommitdiff
path: root/eclass/kde4-functions.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/kde4-functions.eclass')
-rw-r--r--eclass/kde4-functions.eclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 64f26df6262..830dcf68777 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -133,9 +133,10 @@ comment_add_subdirectory() {
die "comment_add_subdirectory must be passed the directory name to comment"
fi
- sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
- -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
-
+ if [[ -a "CMakeLists.txt" ]]; then
+ sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
+ -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
+ fi
}
# @FUNCTION: comment_all_add_subdirectory