From f22edf13dc28a018bf0fbc0a15b378967d5372ce Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Tue, 2 Feb 2016 05:55:24 +0100 Subject: [PATCH] Simplify file generation paths --- CMakeLists.txt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 649ee527..ce668274 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,25 +368,22 @@ include(CMakePackageConfigHelpers) set(GLFW_CONFIG_PATH "lib${LIB_SUFFIX}/cmake/glfw3") -configure_package_config_file("${GLFW_SOURCE_DIR}/src/glfw3Config.cmake.in" - "${GLFW_BINARY_DIR}/src/glfw3Config.cmake" +configure_package_config_file(src/glfw3Config.cmake.in + src/glfw3Config.cmake INSTALL_DESTINATION "${GLFW_CONFIG_PATH}" NO_CHECK_REQUIRED_COMPONENTS_MACRO) -write_basic_package_version_file("${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake" +write_basic_package_version_file(src/glfw3ConfigVersion.cmake VERSION ${GLFW_VERSION_FULL} COMPATIBILITY SameMajorVersion) if (GLFW_BUILD_DOCS) - configure_file("${GLFW_SOURCE_DIR}/docs/Doxyfile.in" - "${GLFW_BINARY_DIR}/docs/Doxyfile" @ONLY) + configure_file(docs/Doxyfile.in docs/Doxyfile @ONLY) endif() -configure_file("${GLFW_SOURCE_DIR}/src/glfw_config.h.in" - "${GLFW_BINARY_DIR}/src/glfw_config.h" @ONLY) +configure_file(src/glfw_config.h.in src/glfw_config.h @ONLY) -configure_file("${GLFW_SOURCE_DIR}/src/glfw3.pc.in" - "${GLFW_BINARY_DIR}/src/glfw3.pc" @ONLY) +configure_file(src/glfw3.pc.in src/glfw3.pc @ONLY) #-------------------------------------------------------------------- # Add subdirectories @@ -425,8 +422,8 @@ if (GLFW_INSTALL) # Only generate this target if no higher-level project already has if (NOT TARGET uninstall) - configure_file("${GLFW_SOURCE_DIR}/cmake_uninstall.cmake.in" - "${GLFW_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) + configure_file(cmake_uninstall.cmake.in + cmake_uninstall.cmake IMMEDIATE @ONLY) add_custom_target(uninstall "${CMAKE_COMMAND}" -P