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 | |
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.
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | g15helper/CMakeLists.txt | 10 | ||||
-rw-r--r-- | g15helper/g15helper.plist.in (renamed from g15helper/g15helper.plist) | 4 | ||||
-rw-r--r-- | g15helper/g15helper.rc.in (renamed from g15helper/g15helper.rc) | 2 | ||||
-rw-r--r-- | macx/osax/CMakeLists.txt | 4 | ||||
-rw-r--r-- | macx/osax/osax.plist.in (renamed from macx/osax/osax.plist) | 2 | ||||
-rw-r--r-- | overlay/CMakeLists.txt | 8 | ||||
-rw-r--r-- | overlay/mumble_ol.rc.in (renamed from overlay/mumble_ol.rc) | 2 | ||||
-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 | ||||
-rw-r--r-- | overlay_winx64/mumble_ol.rc.in (renamed from overlay_winx64/mumble_ol.rc) | 20 | ||||
-rw-r--r-- | overlay_winx64/overlay_exe_winx64/overlay_exe.rc.in (renamed from overlay_winx64/overlay_exe_winx64/overlay_exe.rc) | 20 | ||||
-rw-r--r-- | src/mumble/CMakeLists.txt | 17 | ||||
-rw-r--r-- | src/mumble/mumble.plist.in (renamed from src/mumble/mumble.plist) | 4 | ||||
-rw-r--r-- | src/mumble/mumble.rc.in (renamed from src/mumble/mumble.rc) | 2 | ||||
-rwxr-xr-x | src/mumble/mumble_dll.rc.in (renamed from src/mumble/mumble_dll.rc) | 2 | ||||
-rw-r--r-- | src/mumble_exe/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/murmur/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/murmur/murmur.plist.in (renamed from src/murmur/murmur.plist) | 4 | ||||
-rw-r--r-- | src/murmur/murmur.rc.in (renamed from src/murmur/murmur.rc) | 2 |
20 files changed, 77 insertions, 67 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 31b92c8ff..e17cdd6f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,9 @@ set(version "1.4.0" CACHE STRING "Project version") string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]" version_short ${version}) +# Get compilation year +string(TIMESTAMP MUMBLE_BUILD_YEAR "%Y") + project(Mumble VERSION ${version_short} DESCRIPTION "Open source, low-latency, high quality voice chat." diff --git a/g15helper/CMakeLists.txt b/g15helper/CMakeLists.txt index bb7ce795f..78dbabec8 100644 --- a/g15helper/CMakeLists.txt +++ b/g15helper/CMakeLists.txt @@ -5,16 +5,18 @@ option(g15-emulator "Build the g15helper executable in emulator mode. This will cause an emulated G15 window to appear on screen. Allows the use of Mumble's G15 support without owning the physical hardware." OFF) -set(G15HELPER_RC "g15helper.rc") +set(G15HELPER_RC "${CMAKE_CURRENT_BINARY_DIR}/g15helper.rc") set(G15HELPER_ICON "${CMAKE_SOURCE_DIR}/icons/g15helper.ico") +set(G15HELPER_PLIST "${CMAKE_BINARY_DIR}/g15helper.plist") -get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/g15helper.plist.in" "${G15HELPER_PLIST}") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/g15helper.rc.in" "${G15HELPER_RC}") -configure_file(${G15HELPER_RC} ${CMAKE_CURRENT_BINARY_DIR}) +get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR) add_executable(g15-helper WIN32 "${MUMBLE_SOURCE_DIR}/mumble.appcompat.manifest" - "${CMAKE_CURRENT_BINARY_DIR}/${G15HELPER_RC}" + "${G15HELPER_RC}" ) set_target_properties(g15-helper diff --git a/g15helper/g15helper.plist b/g15helper/g15helper.plist.in index c788135b2..a1a2280fb 100644 --- a/g15helper/g15helper.plist +++ b/g15helper/g15helper.plist.in @@ -13,8 +13,8 @@ <key>CFBundleSignature</key> <string>G15H</string> <key>CFBundleVersion</key> - <string>1.4.0</string> + <string>@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@</string> <key>NSHumanReadableCopyright</key> - <string>Copyright (c) 2005-2020 The Mumble Developers</string> + <string>Copyright (c) 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers</string> </dict> </plist> diff --git a/g15helper/g15helper.rc b/g15helper/g15helper.rc.in index cd4ae46c8..731657b90 100644 --- a/g15helper/g15helper.rc +++ b/g15helper/g15helper.rc.in @@ -36,7 +36,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "Mumble G15 LCD Helper" 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", "mumble-g15-helper.exe" VALUE "ProductName", "Mumble G15 LCD Helper" #ifdef SNAPSHOT_BUILD diff --git a/macx/osax/CMakeLists.txt b/macx/osax/CMakeLists.txt index 52a48ee64..f73dfe2d8 100644 --- a/macx/osax/CMakeLists.txt +++ b/macx/osax/CMakeLists.txt @@ -11,13 +11,15 @@ add_library(MumbleOverlay MODULE "MumbleOverlay.sdef" ) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/osax.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/osax.plist") + set_target_properties(MumbleOverlay PROPERTIES BUNDLE TRUE BUNDLE_EXTENSION "osax" RESOURCE "MumbleOverlay.sdef" LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/osax.plist" + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/osax.plist" ) find_library(LIB_COCOA "Cocoa") diff --git a/macx/osax/osax.plist b/macx/osax/osax.plist.in index 99f81ef20..b73c146a0 100644 --- a/macx/osax/osax.plist +++ b/macx/osax/osax.plist.in @@ -13,7 +13,7 @@ <key>CFBundlePackageType</key> <string>osax</string> <key>CFbundleVersion</key> - <string>1.4.0</string> + <string>@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@</string> <key>CFBundleSignature</key> <string>MUOL</string> <key>CSResourcesFileMapped</key> diff --git a/overlay/CMakeLists.txt b/overlay/CMakeLists.txt index 6cb1e85cf..e46a49fc3 100644 --- a/overlay/CMakeLists.txt +++ b/overlay/CMakeLists.txt @@ -25,7 +25,9 @@ set(COMPILED_DX11_PIXEL_SHADERS "overlay11.ps.h") set(COMPILED_DX11_VERTEX_SHADERS "overlay11.vs.h") set(COMPILED_EFFECTS "overlay.hex") -set(OVERLAY_RC "mumble_ol.rc") +set(OVERLAY_RC "${CMAKE_CURRENT_BINARY_DIR}/mumble_ol.rc") + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mumble_ol.rc.in" "${OVERLAY_RC}") # We save the output name in a variable because it's used by configure_file() if(64_BIT AND NOT BUILD_OVERLAY_XCOMPILE) @@ -38,8 +40,6 @@ remove_definitions("-DUNICODE") add_library(overlay SHARED) -configure_file(${OVERLAY_RC} ${CMAKE_CURRENT_BINARY_DIR}) - find_program(FXC "fxc" DOC "Effect-Compiler tool") if(NOT FXC) message(FATAL_ERROR "Effect-Compiler tool not found!") @@ -102,7 +102,7 @@ target_sources(overlay "overlay_launchers.h" "overlay_whitelist.h" - "${CMAKE_CURRENT_BINARY_DIR}/${OVERLAY_RC}" + "${OVERLAY_RC}" ) set_target_properties(overlay PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) diff --git a/overlay/mumble_ol.rc b/overlay/mumble_ol.rc.in index 19f5ee188..065d64cf0 100644 --- a/overlay/mumble_ol.rc +++ b/overlay/mumble_ol.rc.in @@ -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 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 diff --git a/overlay_winx64/mumble_ol.rc b/overlay_winx64/mumble_ol.rc.in index 6c3831b91..cee2b9027 100644 --- a/overlay_winx64/mumble_ol.rc +++ b/overlay_winx64/mumble_ol.rc.in @@ -18,13 +18,13 @@ #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,4,0,0 - PRODUCTVERSION 1,4,0,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS (VER_DEBUG|VER_RELEASE) - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL - 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_DLL + FILESUBTYPE 0L BEGIN BLOCK "StringFileInfo" BEGIN @@ -32,9 +32,9 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "The Mumble Developers" VALUE "FileDescription", "Mumble - Low-latency VoIP client" - VALUE "FileVersion", "1.4.0" - VALUE "ProductVersion", "1.4.0" - VALUE "LegalCopyright", "Copyright (c) 2005-2020 The Mumble Developers" + VALUE "FileVersion", "@PROJECT_VERSION@" + VALUE "ProductVersion", "@PROJECT_VERSION@" + VALUE "LegalCopyright", "Copyright (c) 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers" VALUE "OriginalFilename", "mumble_ol_x64.dll" VALUE "ProductName", "Mumble" #ifdef SNAPSHOT_BUILD diff --git a/overlay_winx64/overlay_exe_winx64/overlay_exe.rc b/overlay_winx64/overlay_exe_winx64/overlay_exe.rc.in index 7d0c0c9a3..2d6a2ff66 100644 --- a/overlay_winx64/overlay_exe_winx64/overlay_exe.rc +++ b/overlay_winx64/overlay_exe_winx64/overlay_exe.rc.in @@ -18,13 +18,13 @@ #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,4,0,0 - PRODUCTVERSION 1,4,0,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 @@ -32,9 +32,9 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "The Mumble Developers" VALUE "FileDescription", "Mumble - Low-latency VoIP client" - VALUE "FileVersion", "1.4.0" - VALUE "ProductVersion", "1.4.0" - VALUE "LegalCopyright", "Copyright (c) 2005-2020 The Mumble Developers" + VALUE "FileVersion", "@PROJECT_VERSION@" + VALUE "ProductVersion", "@PROJECT_VERSION@" + VALUE "LegalCopyright", "Copyright (c) 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers" VALUE "OriginalFilename", "mumble_ol_helper_x64.exe" VALUE "ProductName", "Mumble" #ifdef SNAPSHOT_BUILD diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt index c0eaf813f..3aef73c69 100644 --- a/src/mumble/CMakeLists.txt +++ b/src/mumble/CMakeLists.txt @@ -3,13 +3,17 @@ # that can be found in the LICENSE file at the root of the # Mumble source tree or at <https://www.mumble.info/LICENSE>. -set(MUMBLE_RC "mumble.rc") -set(MUMBLE_DLL_RC "mumble_dll.rc") -set(MUMBLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/mumble.plist") +set(MUMBLE_RC "${CMAKE_CURRENT_BINARY_DIR}/mumble.rc") +set(MUMBLE_DLL_RC "${CMAKE_CURRENT_BINARY_DIR}/mumble_dll.rc") +set(MUMBLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/mumble.plist") set(MUMBLE_ICON "${CMAKE_SOURCE_DIR}/icons/mumble.ico") set(MUMBLE_ICNS "${CMAKE_SOURCE_DIR}/icons/mumble.icns") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mumble.rc.in" "${MUMBLE_RC}") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mumble_dll.rc.in" "${MUMBLE_DLL_RC}") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mumble.plist.in" "${MUMBLE_PLIST}") + include(qt-utils) option(update "Check for updates by default." ON) @@ -254,20 +258,17 @@ if(static AND WIN32) set_target_properties(mumble PROPERTIES PREFIX "") endif() - configure_file(${MUMBLE_DLL_RC} ${CMAKE_CURRENT_BINARY_DIR}) - target_sources(mumble PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${MUMBLE_DLL_RC}") + target_sources(mumble PRIVATE "${MUMBLE_DLL_RC}") add_subdirectory("${SHARED_SOURCE_DIR}/mumble_exe" "${CMAKE_BINARY_DIR}/mumble_exe") else() add_executable(mumble ${MUMBLE_SOURCES}) if(WIN32) - configure_file(${MUMBLE_RC} ${CMAKE_CURRENT_BINARY_DIR}) - target_sources(mumble PRIVATE "mumble.appcompat.manifest" - "${CMAKE_CURRENT_BINARY_DIR}/${MUMBLE_RC}" + "${MUMBLE_RC}" ) if(elevation) diff --git a/src/mumble/mumble.plist b/src/mumble/mumble.plist.in index bd946f829..3cc2a350d 100644 --- a/src/mumble/mumble.plist +++ b/src/mumble/mumble.plist.in @@ -26,9 +26,9 @@ </dict> </array> <key>CFBundleVersion</key> - <string>1.4.0</string> + <string>@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@</string> <key>NSHumanReadableCopyright</key> - <string>Copyright (c) 2005-2020 The Mumble Developers</string> + <string>Copyright (c) 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers</string> <key>NSPrincipalClass</key> <string>NSApplication</string> <key>NSHighResolutionCapable</key> diff --git a/src/mumble/mumble.rc b/src/mumble/mumble.rc.in index 9c8f44142..e5c8ec7b3 100644 --- a/src/mumble/mumble.rc +++ b/src/mumble/mumble.rc.in @@ -36,7 +36,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", "mumble.exe" VALUE "ProductName", "Mumble" #ifdef SNAPSHOT_BUILD diff --git a/src/mumble/mumble_dll.rc b/src/mumble/mumble_dll.rc.in index 93b431ff0..b416d0082 100755 --- a/src/mumble/mumble_dll.rc +++ b/src/mumble/mumble_dll.rc.in @@ -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", "mumble_app.dll" VALUE "ProductName", "Mumble" #ifdef SNAPSHOT_BUILD diff --git a/src/mumble_exe/CMakeLists.txt b/src/mumble_exe/CMakeLists.txt index 2ea64a169..02acd9c37 100644 --- a/src/mumble_exe/CMakeLists.txt +++ b/src/mumble_exe/CMakeLists.txt @@ -7,14 +7,14 @@ add_executable(mumble_exe WIN32) target_include_directories(mumble_exe PRIVATE "${SHARED_SOURCE_DIR}") -configure_file("${SHARED_SOURCE_DIR}/mumble/${MUMBLE_RC}" ${CMAKE_CURRENT_BINARY_DIR}) +configure_file("${SHARED_SOURCE_DIR}/mumble/mumble.rc.in" "${CMAKE_CURRENT_BINARY_DIR}/mumble.rc") target_sources(mumble_exe PRIVATE "mumble_exe.cpp" "Overlay.cpp" "${SHARED_SOURCE_DIR}/mumble/mumble.appcompat.manifest" - "${CMAKE_CURRENT_BINARY_DIR}/${MUMBLE_RC}" + "${MUMBLE_RC}" ) set_target_properties(mumble_exe diff --git a/src/murmur/CMakeLists.txt b/src/murmur/CMakeLists.txt index 6cb8d7d54..21e1a37fc 100644 --- a/src/murmur/CMakeLists.txt +++ b/src/murmur/CMakeLists.txt @@ -3,8 +3,12 @@ # that can be found in the LICENSE file at the root of the # Mumble source tree or at <https://www.mumble.info/LICENSE>. -set(MURMUR_RC "murmur.rc") +set(MURMUR_RC "${CMAKE_CURRENT_BINARY_DIR}/murmur.rc") set(MURMUR_ICON "${CMAKE_SOURCE_DIR}/icons/murmur.ico") +set(MURMUR_PLIST "${CMAKE_CURRENT_BINARY_DIR}/murmur.plist") + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/murmur.plist.in" "${MURMUR_PLIST}") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/murmur.rc.in" "${MURMUR_RC}") set(GRPC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/MurmurRPC.proto") set(ICE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Murmur.ice") @@ -98,8 +102,6 @@ if(static) endif() if(WIN32) - configure_file(${MURMUR_RC} ${CMAKE_CURRENT_BINARY_DIR}) - target_sources(murmur PRIVATE "About.cpp" @@ -109,7 +111,7 @@ if(WIN32) "murmur.qrc" "${SHARED_SOURCE_DIR}/mumble/mumble.appcompat.manifest" - "${CMAKE_CURRENT_BINARY_DIR}/${MURMUR_RC}" + "${MURMUR_RC}" ) find_pkg(Qt5 COMPONENTS Widgets REQUIRED) diff --git a/src/murmur/murmur.plist b/src/murmur/murmur.plist.in index 2e85aa245..4ab68d885 100644 --- a/src/murmur/murmur.plist +++ b/src/murmur/murmur.plist.in @@ -13,8 +13,8 @@ <key>CFBundleSignature</key> <string>MMUR</string> <key>CFBundleVersion</key> - <string>1.4.0</string> + <string>@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@</string> <key>NSHumanReadableCopyright</key> - <string>Copyright (c) 2005-2020 The Mumble Developers</string> + <string>Copyright (c) 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers</string> </dict> </plist> diff --git a/src/murmur/murmur.rc b/src/murmur/murmur.rc.in index 743c3352e..3bd1bff71 100644 --- a/src/murmur/murmur.rc +++ b/src/murmur/murmur.rc.in @@ -36,7 +36,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "Murmur - Low-latency VoIP server" 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", "murmur.exe" VALUE "ProductName", "Mumble" #ifdef SNAPSHOT_BUILD |