diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b35d2684..e3cc00f186 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,12 +227,12 @@ endif() #================================================ # make uninstall rules #================================================ -CONFIGURE_FILE( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" +configure_file( + "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) -ADD_CUSTOM_TARGET(uninstall +add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") diff --git a/cmake_uninstall.cmake.in b/CMakeModules/cmake_uninstall.cmake.in similarity index 100% rename from cmake_uninstall.cmake.in rename to CMakeModules/cmake_uninstall.cmake.in