aboutsummaryrefslogtreecommitdiff
path: root/cmake/platform
diff options
context:
space:
mode:
authorclick <none@none>2010-09-29 23:42:09 +0200
committerclick <none@none>2010-09-29 23:42:09 +0200
commitb87d8f470042628ac54386853cf877cec107c141 (patch)
tree6fbd34d0adab95f831ade4cb5a630c9478a3d398 /cmake/platform
parentaf660f80ec2a4e8f6687ed8999f4bff75889eef2 (diff)
Buildsystem: Overhaul of the CMake buildsystem:
- utilize CMake for completely generating revision.h (kills off genrev and revision.h targets): - pull and set correct revision-ID/hash from Mercurial (hg) when using regular repository sourcetree - pull and set correct revision-ID/hash from archived releases (when pulled from googlecode) - set and use _BUILD_DIRECTIVE definition (earlier part of revision.h) as compiletime definition - delete genrev and related buildsystems (now deprecated) - Move some files around to adhere to buildsystem structure Thanks to Shauren for figuring out the definition-behaviour for MSVC while he was in the shower --HG-- branch : trunk rename : cmake_uninstall.cmake.in => cmake/platform/unix/cmake_uninstall.in.cmake
Diffstat (limited to 'cmake/platform')
-rw-r--r--cmake/platform/unix/cmake_uninstall.in.cmake23
-rw-r--r--cmake/platform/unix/settings.cmake6
2 files changed, 26 insertions, 3 deletions
diff --git a/cmake/platform/unix/cmake_uninstall.in.cmake b/cmake/platform/unix/cmake_uninstall.in.cmake
new file mode 100644
index 00000000000..06f9c8263a8
--- /dev/null
+++ b/cmake/platform/unix/cmake_uninstall.in.cmake
@@ -0,0 +1,23 @@
+# from cmake wiki
+IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
+ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+STRING(REGEX REPLACE "\n" ";" files "${files}")
+FOREACH(file ${files})
+ MESSAGE(STATUS "Uninstalling \"${file}\"")
+ IF(EXISTS "${file}")
+ EXEC_PROGRAM(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ IF("${rm_retval}" STREQUAL 0)
+ ELSE("${rm_retval}" STREQUAL 0)
+ MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
+ ENDIF("${rm_retval}" STREQUAL 0)
+ ELSE(EXISTS "${file}")
+ MESSAGE(STATUS "File \"${file}\" does not exist.")
+ ENDIF(EXISTS "${file}")
+ENDFOREACH(file)
diff --git a/cmake/platform/unix/settings.cmake b/cmake/platform/unix/settings.cmake
index 9dae9f5ca9f..72d4ea30927 100644
--- a/cmake/platform/unix/settings.cmake
+++ b/cmake/platform/unix/settings.cmake
@@ -12,9 +12,9 @@ endif()
# configure uninstaller
configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY
+ "${CMAKE_SOURCE_DIR}/cmake/platform/unix/cmake_uninstall.in.cmake"
+ "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
+ @ONLY
)
message(STATUS "UNIX: Configuring uninstall target")