diff options
author | Robert Adam <dev@robert-adam.de> | 2020-09-02 10:22:16 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2020-09-02 19:30:33 +0300 |
commit | 40090d297f03977906557d4dfd2fd29067cf680d (patch) | |
tree | 51c2686d81d88e7ee46a8d728c01c4f3b4fab3d6 /overlay/overlay_exe | |
parent | 8bdf32d4808135e8e8d6cba004e36b4a6ead0f42 (diff) |
MAINT: Make use of cmake configure for version
Instead of having to change the version number and the build year in all
those files manually, we let cmake do the work by replacing the
respective values in templates.
Diffstat (limited to 'overlay/overlay_exe')
-rw-r--r-- | overlay/overlay_exe/CMakeLists.txt | 8 | ||||
-rw-r--r-- | overlay/overlay_exe/overlay_exe.rc.in (renamed from overlay/overlay_exe/overlay_exe.rc) | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/overlay/overlay_exe/CMakeLists.txt b/overlay/overlay_exe/CMakeLists.txt index 51e8f165b..cb32ff33f 100644 --- a/overlay/overlay_exe/CMakeLists.txt +++ b/overlay/overlay_exe/CMakeLists.txt @@ -3,7 +3,9 @@ # that can be found in the LICENSE file at the root of the # Mumble source tree or at <https://www.mumble.info/LICENSE>. -set(OVERLAY_EXE_RC "overlay_exe.rc") +set(OVERLAY_EXE_RC "${CMAKE_CURRENT_BINARY_DIR}/overlay_exe.rc") + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/overlay_exe.rc.in" "${OVERLAY_EXE_RC}") add_definitions("-DUNICODE" "-DWIN32_LEAN_AND_MEAN") @@ -18,14 +20,12 @@ if(NOT BUILD_OVERLAY_XCOMPILE) get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR) endif() -configure_file(${OVERLAY_EXE_RC} ${CMAKE_CURRENT_BINARY_DIR}) - add_executable(overlay_exe WIN32 "overlay_exe.cpp" "overlay_exe.h" "${MUMBLE_SOURCE_DIR}/mumble.appcompat.manifest" - "${CMAKE_CURRENT_BINARY_DIR}/${OVERLAY_EXE_RC}" + "${OVERLAY_EXE_RC}" ) set_target_properties(overlay_exe PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) diff --git a/overlay/overlay_exe/overlay_exe.rc b/overlay/overlay_exe/overlay_exe.rc.in index e4a48358c..b3ab0ace5 100644 --- a/overlay/overlay_exe/overlay_exe.rc +++ b/overlay/overlay_exe/overlay_exe.rc.in @@ -18,13 +18,13 @@ #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 - PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS (VER_DEBUG|VER_RELEASE) - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0L + FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 + PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS (VER_DEBUG|VER_RELEASE) + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0L BEGIN BLOCK "StringFileInfo" BEGIN @@ -34,7 +34,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "Mumble - Low-latency VoIP client" VALUE "FileVersion", "@PROJECT_VERSION@" VALUE "ProductVersion", "@PROJECT_VERSION@" - VALUE "LegalCopyright", "Copyright (c) 2005-2020 The Mumble Developers" + VALUE "LegalCopyright", "Copyright (c) 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers" VALUE "OriginalFilename", "@OUTPUT_NAME@" VALUE "ProductName", "Mumble" #ifdef SNAPSHOT_BUILD |