diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-21 00:48:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-22 13:24:47 (GMT) |
commit | 0aed435b351577681a7cbbd8c542fbe998d1717d (patch) | |
tree | 49eea98dfea8fa493bf27d70b2b0fafc828277d2 /Source/CMakeLists.txt | |
parent | a67c9f975686d4036a31597d535982c31df97ebe (diff) | |
download | CMake-0aed435b351577681a7cbbd8c542fbe998d1717d.zip CMake-0aed435b351577681a7cbbd8c542fbe998d1717d.tar.gz CMake-0aed435b351577681a7cbbd8c542fbe998d1717d.tar.bz2 |
Build: Simplify `configure_file()` calls
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b1a79af..82978d5 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -43,31 +43,19 @@ endif() # configure the .dox.in file if(CMake_BUILD_DEVELOPER_REFERENCE) - configure_file( - "${CMake_SOURCE_DIR}/Source/dir.dox.in" - "${CMake_BINARY_DIR}/Source/dir.dox" - @ONLY - ) + configure_file(dir.dox.in dir.dox @ONLY) endif() # configure the .h file -configure_file( - "${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in" - "${CMake_BINARY_DIR}/Source/cmConfigure.h" - ) -configure_file( - "${CMake_SOURCE_DIR}/Source/cmVersionConfig.h.in" - "${CMake_BINARY_DIR}/Source/cmVersionConfig.h" - ) -configure_file( - "${CMake_SOURCE_DIR}/Source/CPack/cmCPackConfigure.h.in" - "${CMake_BINARY_DIR}/Source/CPack/cmCPackConfigure.h" - ) +configure_file(cmConfigure.cmake.h.in cmConfigure.h) +configure_file(cmVersionConfig.h.in cmVersionConfig.h) +configure_file(CPack/cmCPackConfigure.h.in CPack/cmCPackConfigure.h) # Tell CMake executable in the build tree where to find the source tree. configure_file( - "${CMake_SOURCE_DIR}/Source/CMakeSourceDir.txt.in" - "${CMake_BINARY_DIR}/CMakeFiles/CMakeSourceDir.txt" @ONLY + CMakeSourceDir.txt.in + "${CMake_BINARY_DIR}/CMakeFiles/CMakeSourceDir.txt" + @ONLY ) # add the include path to find the .h @@ -1208,7 +1196,7 @@ if(WIN32) set(CMake_RCVERSION_STR ${CMake_VERSION}) # Add Windows executable version information. - configure_file("CMakeVersion.rc.in" "CMakeVersion.rc" @ONLY) + configure_file(CMakeVersion.rc.in CMakeVersion.rc @ONLY) # We use a separate object library for this to work around a limitation of # MinGW's windres tool with spaces in the path to the include directories. |