Przeglądaj źródła

Move CMake uninstall template file to CMake subdir

Camilla Löwy 5 lat temu
rodzic
commit
b5d4f24f74
2 zmienionych plików z 4 dodań i 4 usunięć
  1. 3 3
      CMake/cmake_uninstall.cmake.in
  2. 1 1
      CMakeLists.txt

+ 3 - 3
cmake_uninstall.cmake.in → CMake/cmake_uninstall.cmake.in

@@ -1,9 +1,9 @@
 
-if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
-  message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
+if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt")
+    message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"")
 endif()
 
-file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files)
 string(REGEX REPLACE "\n" ";" files "${files}")
 
 foreach (file ${files})

+ 1 - 1
CMakeLists.txt

@@ -367,7 +367,7 @@ if (GLFW_INSTALL)
 
     # Only generate this target if no higher-level project already has
     if (NOT TARGET uninstall)
-        configure_file(cmake_uninstall.cmake.in
+        configure_file(CMake/cmake_uninstall.cmake.in
                        cmake_uninstall.cmake IMMEDIATE @ONLY)
 
         add_custom_target(uninstall