From c2f149cca34eeebe0f9e93bc41007d8dddc8103c Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 5 Feb 2021 10:14:52 +0800 Subject: [PATCH] Use built-in function for configuring file contents --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 052ec48de..2f952c8c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,5 +61,4 @@ else() endif() # Generate version header -file(READ "src/base/version.h.in" versionHeader) -file(WRITE "src/base/version.h" "${versionHeader}") +configure_file("src/base/version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/base/version.h" @ONLY)