| 1 |
function(dolphin_inject_version_info target) |
| 2 |
set(INFO_PLIST_PATH "$<TARGET_BUNDLE_DIR:${target}>/Contents/Info.plist") |
| 3 |
add_custom_command(TARGET ${target} |
| 4 |
POST_BUILD |
| 5 |
|
| 6 |
COMMAND /usr/libexec/PlistBuddy -c |
| 7 |
"Delete :CFBundleShortVersionString" |
| 8 |
"${INFO_PLIST_PATH}" |
| 9 |
|| true |
| 10 |
|
| 11 |
COMMAND /usr/libexec/PlistBuddy -c |
| 12 |
"Delete :CFBundleLongVersionString" |
| 13 |
"${INFO_PLIST_PATH}" |
| 14 |
|| true |
| 15 |
|
| 16 |
COMMAND /usr/libexec/PlistBuddy -c |
| 17 |
"Delete :CFBundleVersion" |
| 18 |
"${INFO_PLIST_PATH}" |
| 19 |
|| true |
| 20 |
|
| 21 |
COMMAND /usr/libexec/PlistBuddy -c |
| 22 |
"Merge '${CMAKE_BINARY_DIR}/Source/Core/VersionInfo.plist'" |
| 23 |
"${INFO_PLIST_PATH}") |
| 24 |
endfunction() |