cmake: Remove custom install code
authorJuan Ramos <juan@lunarg.com>
Fri, 27 Jan 2023 22:44:47 +0000 (15:44 -0700)
committerJuan Ramos <114601453+juan-lunarg@users.noreply.github.com>
Sat, 28 Jan 2023 00:19:54 +0000 (17:19 -0700)
BUILD.md
CMakeLists.txt
cmake/cmake_uninstall.cmake.in [deleted file]

index 9fc12293b7785eaee3ad6e0f2c0165fb9955fc37..a9260ddf3878b25b0eedd489983da5b2b0e08eb6 100644 (file)
--- a/BUILD.md
+++ b/BUILD.md
@@ -44,7 +44,6 @@ Instructions for building this repository on Linux, Windows, and MacOS.
       - [Using The Vulkan Loader Library in this Repository on Linux](#using-the-vulkan-loader-library-in-this-repository-on-linux)
       - [WSI Support Build Options](#wsi-support-build-options)
       - [Linux Install to System Directories](#linux-install-to-system-directories)
-      - [Linux Uninstall](#linux-uninstall)
       - [Linux 32-bit support](#linux-32-bit-support)
   - [Building on MacOS](#building-on-macos)
     - [MacOS Development Environment Requirements](#macos-development-environment-requirements)
@@ -84,9 +83,6 @@ indicated by *install_dir*:
 - *install_dir*`/lib` : The Vulkan loader library
 - *install_dir*`/bin` : The Vulkan loader library DLL (Windows)
 
-The `uninstall` target can be used to remove the above files from the install
-directory.
-
 ## Repository Set-Up
 
 ### Display Drivers
@@ -577,13 +573,6 @@ Vulkan loader from the build directory, `build` in this example. This means
 that even after installing the loader to the system directories, these
 executables still use the loader from the build directory.
 
-#### Linux Uninstall
-
-To uninstall the files from the system directories, you can execute:
-
-    sudo make uninstall
-
-
 #### Linux 32-bit support
 
 Usage of this repository's contents in 32-bit Linux environments is not
index e972081c14355d7560478e445157c54c7109fb8a..2d5bfafd3f8187d09fe3f22697a15386ec0759ec 100644 (file)
@@ -76,11 +76,6 @@ if (GIT_FOUND AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git/HEAD")
     endif()
 endif()
 
-if(WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-    # Windows: if install locations not set by user, set install prefix to "<build_dir>\install".
-    set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/install" CACHE PATH "default install path" FORCE)
-endif()
-
 # Enable IDE GUI folders.  "Helper targets" that don't have interesting source code should set their FOLDER property to this
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 set(LOADER_HELPER_FOLDER "Helper Targets")
@@ -275,16 +270,6 @@ if(UNIX)
     endif()
 endif()
 
-# uninstall target
-if(NOT TARGET uninstall)
-    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
-                   "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
-                   IMMEDIATE
-                   @ONLY)
-    add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-    set_target_properties(uninstall PROPERTIES FOLDER ${LOADER_HELPER_FOLDER})
-endif()
-
 add_subdirectory(loader)
 
 option(BUILD_TESTS "Build Tests")
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
deleted file mode 100644 (file)
index 2037e36..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-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 $ENV{DESTDIR}${file}")
-  if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
-    exec_program(
-      "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
-      OUTPUT_VARIABLE rm_out
-      RETURN_VALUE rm_retval
-      )
-    if(NOT "${rm_retval}" STREQUAL 0)
-      message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
-    endif(NOT "${rm_retval}" STREQUAL 0)
-  else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
-    message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
-  endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
-endforeach(file)