summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 00:48:36 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-22 13:24:47 (GMT)
commit0aed435b351577681a7cbbd8c542fbe998d1717d (patch)
tree49eea98dfea8fa493bf27d70b2b0fafc828277d2 /Source
parenta67c9f975686d4036a31597d535982c31df97ebe (diff)
downloadCMake-0aed435b351577681a7cbbd8c542fbe998d1717d.zip
CMake-0aed435b351577681a7cbbd8c542fbe998d1717d.tar.gz
CMake-0aed435b351577681a7cbbd8c542fbe998d1717d.tar.bz2
Build: Simplify `configure_file()` calls
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt28
-rw-r--r--Source/CursesDialog/form/CMakeLists.txt2
-rw-r--r--Source/QtDialog/CMakeLists.txt3
3 files changed, 10 insertions, 23 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.
diff --git a/Source/CursesDialog/form/CMakeLists.txt b/Source/CursesDialog/form/CMakeLists.txt
index 68d28c8..63214e3 100644
--- a/Source/CursesDialog/form/CMakeLists.txt
+++ b/Source/CursesDialog/form/CMakeLists.txt
@@ -11,7 +11,7 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
endif()
-configure_file(cmFormConfigure.h.in "${CMAKE_CURRENT_BINARY_DIR}/cmFormConfigure.h")
+configure_file(cmFormConfigure.h.in cmFormConfigure.h)
add_library(cmForm
fld_arg.c
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 95962d8..a635200 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -348,5 +348,4 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
endif()
set(CMAKE_PACKAGE_QTGUI TRUE)
-configure_file("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
- "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)
+configure_file(QtDialogCPack.cmake.in QtDialogCPack.cmake @ONLY)