ScmRevGen: Don't generate Info.plist files directly

Some generators (like Unix Makefiles and Xcode) copy an app's Info.plist at configure time.
This causes a problem when we need to generate the Info.plist at build time, like how we
currently do it with ScmRevGen. Instead of generating the Info.plist directly in ScmRevGen,
provide an Info.plist without any version information to CMake at configure time, have
ScmRevGen generate a separate plist file with the version information at build time, and
then merge the two together to create the final Info.plist.
This commit is contained in:
OatmealDome
2024-12-04 23:25:26 -05:00
parent 3c27c38e71
commit e05b033dd2
8 changed files with 49 additions and 22 deletions

View File

@ -16,7 +16,7 @@ add_dependencies(MacUpdater dolphin_scmrev)
set_target_properties(MacUpdater PROPERTIES
MACOSX_BUNDLE true
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist"
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
OUTPUT_NAME "Dolphin Updater")
target_compile_options(MacUpdater PRIVATE -x objective-c++)
@ -53,6 +53,9 @@ foreach(sb ${STORYBOARDS})
COMMENT "Compiling Storyboard ${sb}...")
endforeach()
include(DolphinInjectVersionInfo)
dolphin_inject_version_info(MacUpdater)
if(NOT SKIP_POSTPROCESS_BUNDLE)
# Update library references to make the bundle portable
include(DolphinPostprocessBundle)