File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,13 @@ include_directories("${PROJECT_SOURCE_DIR}")
11
11
add_executable (gqrx-scanner ${PROJECT_SOURCE_DIR} /gqrx-scan.c ${PROJECT_SOURCE_DIR} /gqrx-prot.c )
12
12
target_link_libraries (gqrx-scanner m )
13
13
install (TARGETS gqrx-scanner DESTINATION bin )
14
+ # uninstall target
15
+ if (NOT TARGET uninstall )
16
+ configure_file (
17
+ "${CMAKE_CURRENT_SOURCE_DIR} /cmake_uninstall.cmake.in"
18
+ "${CMAKE_CURRENT_BINARY_DIR} /cmake_uninstall.cmake"
19
+ IMMEDIATE @ONLY )
20
+
21
+ add_custom_target (uninstall
22
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR} /cmake_uninstall.cmake )
23
+ endif ()
Original file line number Diff line number Diff line change @@ -118,6 +118,12 @@ make
118
118
sudo make install
119
119
```
120
120
121
+ ## Uninstall
122
+ ```
123
+ sudo make uninstall
124
+ ```
125
+
126
+
121
127
## TODOs
122
128
* set modulation in bookmark search
123
129
* automatic audio recording on signal detection
Original file line number Diff line number Diff line change
1
+ if (NOT EXISTS "install_manifest.txt" )
2
+ message (FATAL_ERROR "Cannot find install manifest: install_manifest.txt" )
3
+ endif (NOT EXISTS "install_manifest.txt" )
4
+
5
+ file (READ "install_manifest.txt" files )
6
+ string (REGEX REPLACE "\n " ";" files "${files} " )
7
+ foreach (file ${files} )
8
+ message (STATUS "Uninstalling $ENV{DESTDIR} ${file} " )
9
+ if (IS_SYMLINK "$ENV{DESTDIR} ${file} " OR EXISTS "$ENV{DESTDIR} ${file} " )
10
+ exec_program (
11
+ "@CMAKE_COMMAND@" ARGS "-E remove \" $ENV{DESTDIR} ${file} \" "
12
+ OUTPUT_VARIABLE rm_out
13
+ RETURN_VALUE rm_retval
14
+ )
15
+ if (NOT "${rm_retval} " STREQUAL 0 )
16
+ message (FATAL_ERROR "Problem when removing $ENV{DESTDIR} ${file} " )
17
+ endif (NOT "${rm_retval} " STREQUAL 0 )
18
+ else (IS_SYMLINK "$ENV{DESTDIR} ${file} " OR EXISTS "$ENV{DESTDIR} ${file} " )
19
+ message (STATUS "File $ENV{DESTDIR} ${file} does not exist." )
20
+ endif (IS_SYMLINK "$ENV{DESTDIR} ${file} " OR EXISTS "$ENV{DESTDIR} ${file} " )
21
+ endforeach (file )
22
+
You can’t perform that action at this time.
0 commit comments