[pdal] make uninstall

Howard Butler howard at hobu.co
Tue Mar 17 14:09:50 PDT 2015


Can you push this into a ticket, and I'll be happy to merge.

Thanks!

Howard

> On Mar 14, 2015, at 10:19 AM, David Burken <dburken at comcast.net> wrote:
> 
> Hi,
> 
> I added an uninstall if you want it.  Handy when there are header changes and so on.
> 
> // Small change to end of CMakeLists.txt:
> 
> $ pwd
> /work/osgeo/pdal/latest
> 
> $ git diff CMakeLists.txt
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index c4bb26b..801ec53 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -331,3 +331,7 @@ install(EXPORT PDALTargets DESTINATION lib/pdal/cmake)
> include(${PDAL_CMAKE_DIR}/config.cmake)
> 
> feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES)
> +
> +# Add uninstall target:
> +add_custom_target( uninstall
> +   "${CMAKE_COMMAND}" -P "${CMAKE_MODULE_PATH}/uninstall.cmake" )
> 
> // Added one file:
> $ pwd
> /work/osgeo/pdal/latest/cmake/modules
> 
> $ cat uninstall.cmake
> #---
> # File: pdal uninstall.cmake
> #---
> set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
> 
> if(NOT EXISTS ${MANIFEST})
> message(FATAL_ERROR "Cannot find install manifest: '${MANIFEST}'")
> endif()
> 
> file(STRINGS ${MANIFEST} files)
> foreach(file ${files})
> if(EXISTS ${file})
> message(STATUS "Removing file: '${file}'")
> 
> exec_program(
> ${CMAKE_COMMAND} ARGS "-E remove ${file}"
> OUTPUT_VARIABLE stdout
> RETURN_VALUE result
> )
> if(NOT "${result}" STREQUAL 0)
> message(FATAL_ERROR "Failed to remove file: '${file}'.")
> endif()
> else()
> MESSAGE(STATUS "File '${file}' does not exist.")
> endif()
> endforeach(file)
> 
> 
> // NOTE1:  This was causing a doubling my CMAKE_MODULE_PATH, as I set the path in my cmake line:  e.g.:
> /work/osgeo/pdal/latest/cmake/modules;/work/osgeo/pdal/latest/cmake/modules
> 
> $ pwd
> /work/osgeo/pdal/latest/cmake
> $ grep CMAKE_MODULE_PATH *
> modules.cmake:set(CMAKE_MODULE_PATH ${PDAL_MODULE_DIR} ${CMAKE_MODULE_PATH})
> 
> // NOTE2:
> You have a bunch of double '//' in your cmake stuff.  e.g. from make install:
> 
> -- Installing: /work/osgeo/deps/include//pdal//UserCallback.hpp
> 
> Take care,
> Dave
> 
> 
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal



More information about the pdal mailing list