From e1940bd3682bd48cd9d233486496675406a79ba0 Mon Sep 17 00:00:00 2001 From: Juan Ramos Date: Wed, 1 Feb 2023 11:07:20 -0700 Subject: cmake: Remove custom install code --- BUILD.md | 26 -------------------------- CMakeLists.txt | 16 ---------------- cmake/cmake_uninstall.cmake.in | 21 --------------------- 3 files changed, 63 deletions(-) delete mode 100644 cmake/cmake_uninstall.cmake.in diff --git a/BUILD.md b/BUILD.md index f95ceb8f..63415e94 100644 --- a/BUILD.md +++ b/BUILD.md @@ -36,9 +36,6 @@ indicated by *install_dir*: - *install_dir*`/lib` : The mock ICD library and JSON (Windows) (If INSTALL_ICD=ON) - *install_dir*`/share/vulkan/icd.d` : mock ICD JSON (Linux/MacOS) (If INSTALL_ICD=ON) -The `uninstall` target can be used to remove the above files from the install -directory. - ## Repository Set-Up ### Display Drivers @@ -355,23 +352,6 @@ build folder. You may select "Debug" or "Release" from the Solution Configurations drop-down list. Start a build by selecting the Build->Build Solution menu item. -#### Windows Install Target - -The CMake project also generates an "install" target that you can use to copy -the primary build artifacts to a specific location using a "bin, include, lib" -style directory structure. This may be useful for collecting the artifacts and -providing them to another project that is dependent on them. - -The default location is `$CMAKE_BINARY_DIR\install`, but can be changed with -the `CMAKE_INSTALL_PREFIX` variable when first generating the project build -files with CMake. - -You can build the install target from the command line with: - - cmake --build . --config Release --target install - -or build the `INSTALL` target from the Visual Studio solution explorer. - #### Using a Loader Built from a Repository If you do need to build and use your own loader, build the Vulkan-Loader @@ -549,12 +529,6 @@ Also see the `LoaderAndLayerInterface` document in the `loader` folder of the Vulkan-Loader repository for more information about loader and layer operation. -#### Linux Uninstall - -To uninstall the files from the system directories, you can execute: - - sudo make uninstall - ### Linux Tests After making any changes to the repository, you should perform some quick diff --git a/CMakeLists.txt b/CMakeLists.txt index 9821a426..0bc37cb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,22 +93,6 @@ message(STATUS "Vulkan Lib = ${Vulkan_LIBRARY}") include(GNUInstallDirs) -if(WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - # Windows: if install locations not set by user, set install prefix to "\install". - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "default install path" FORCE) -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 ${TOOLS_HELPER_FOLDER}) -endif() - option(BUILD_WERROR "Treat compiler warnings as errors" ON) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers") diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in deleted file mode 100644 index 2037e365..00000000 --- a/cmake/cmake_uninstall.cmake.in +++ /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) -- cgit v1.2.3