Merge lp:~ter0/audience/fix-1169372 into lp:~audience-members/audience/trunk

Proposed by Chris Johns
Status: Merged
Approved by: Corentin Noël
Approved revision: 307
Merged at revision: 333
Proposed branch: lp:~ter0/audience/fix-1169372
Merge into: lp:~audience-members/audience/trunk
Diff against target: 44 lines (+32/-0)
2 files modified
CMakeLists.txt (+9/-0)
cmake/Uninstall.cmake (+23/-0)
To merge this branch: bzr merge lp:~ter0/audience/fix-1169372
Reviewer Review Type Date Requested Status
Corentin Noël Approve
Review via email: mp+201288@code.launchpad.net

Commit message

Added uninstall.

To post a comment you must log in.
Revision history for this message
Corentin Noël (tintou) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-04-01 05:05:19 +0000
+++ CMakeLists.txt 2014-01-11 15:01:00 +0000
@@ -88,3 +88,12 @@
88add_subdirectory (po)88add_subdirectory (po)
89add_executable(audience ${VALA_C})89add_executable(audience ${VALA_C})
90install (TARGETS audience RUNTIME DESTINATION bin)90install (TARGETS audience RUNTIME DESTINATION bin)
91
92# uninstall target
93configure_file(
94 "${CMAKE_SOURCE_DIR}/cmake/Uninstall.cmake"
95 "${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake"
96 IMMEDIATE @ONLY)
97
98add_custom_target(uninstall
99 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake)
91100
=== added file 'cmake/Uninstall.cmake'
--- cmake/Uninstall.cmake 1970-01-01 00:00:00 +0000
+++ cmake/Uninstall.cmake 2014-01-11 15:01:00 +0000
@@ -0,0 +1,23 @@
1if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
2 message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
3endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
4
5file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
6string(REGEX REPLACE "\n" ";" files "${files}")
7cmake_policy (SET CMP0007 NEW)
8list(REVERSE files)
9foreach (file ${files})
10 message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
11 if (EXISTS "$ENV{DESTDIR}${file}")
12 execute_process(
13 COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
14 OUTPUT_VARIABLE rm_out
15 RESULT_VARIABLE rm_retval
16 )
17 if(NOT ${rm_retval} EQUAL 0)
18 message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
19 endif (NOT ${rm_retval} EQUAL 0)
20 else (EXISTS "$ENV{DESTDIR}${file}")
21 message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
22 endif (EXISTS "$ENV{DESTDIR}${file}")
23endforeach(file)

Subscribers

People subscribed via source and target branches

to all changes: