From b87d8f470042628ac54386853cf877cec107c141 Mon Sep 17 00:00:00 2001 From: click Date: Wed, 29 Sep 2010 23:42:09 +0200 Subject: 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 --- cmake/platform/unix/cmake_uninstall.in.cmake | 23 +++++++++++++++++++++++ cmake/platform/unix/settings.cmake | 6 +++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 cmake/platform/unix/cmake_uninstall.in.cmake (limited to 'cmake/platform/unix') 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") -- cgit v1.2.3