summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2010-09-13 09:59:40 (GMT)
committer Jaromil <jaromil@dyne.org>2010-09-13 09:59:40 (GMT)
commit5d825c423fd21540d5b3cf1b7890f0c201f0abdd (patch)
tree5f589a688194fb83c799f34af146eef381c5f6c8
parent1b751bd6c0976ee6d92b104135cee72c521728b2 (diff)
added distclean target to cmakev1.2
for better cleanup when making releases also added cmake build files in .gitignore
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt3
-rw-r--r--cmake/modules/TargetDistclean.cmake28
3 files changed, 32 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index e91a18a..cf5839b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,7 @@ tags
*.so
*.la
*.lo
-*.cmake
+cmake_install.cmake
CMakeFiles
CMakeCache.txt
*~
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2889d95..973df68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,4 +20,7 @@ set (LIBDIR lib/frei0r-1)
set (FREI0R_DEF ${CMAKE_SOURCE_DIR}/msvc/frei0r_1_0.def)
set (FREI0R_1_1_DEF ${CMAKE_SOURCE_DIR}/msvc/frei0r_1_1.def)
+# --- custom targets: ---
+INCLUDE( cmake/modules/TargetDistclean.cmake OPTIONAL)
+
add_subdirectory (src)
diff --git a/cmake/modules/TargetDistclean.cmake b/cmake/modules/TargetDistclean.cmake
new file mode 100644
index 0000000..5abbb35
--- /dev/null
+++ b/cmake/modules/TargetDistclean.cmake
@@ -0,0 +1,28 @@
+# add custom target distclean
+# cleans and removes cmake generated files etc.
+# Jan Woetzel 04/2003
+#
+
+IF (UNIX)
+ ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
+ SET(DISTCLEANED
+ cmake.depends
+ cmake.check_depends
+ CMakeCache.txt
+ cmake.check_cache
+ *.cmake
+ Makefile
+ core core.*
+ gmon.out
+ *~
+ )
+
+ ADD_CUSTOM_COMMAND(
+ DEPENDS clean
+ COMMENT "distribution clean"
+ COMMAND rm
+ ARGS -Rf CMakeTmp ${DISTCLEANED}
+ TARGET distclean
+ )
+ENDIF(UNIX)
+