Browse Source

Improve Info.plist generation with CMake

- drop configure_file() and file(GENERATE) calls
- fill missed MACOSX_DEPLOYMENT_TARGET variable
adaptive-webui-19844
Nick Korotysh 4 years ago
parent
commit
28ef33b0a0
No known key found for this signature in database
GPG Key ID: 7D0D4117C97CCC46
  1. 2
      dist/mac/Info.plist
  2. 14
      src/app/CMakeLists.txt

2
dist/mac/Info.plist vendored

@ -57,7 +57,7 @@
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>4.4.0</string> <string>4.4.0</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string> <string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>org.qbittorrent.qBittorrent</string> <string>org.qbittorrent.qBittorrent</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>

14
src/app/CMakeLists.txt

@ -75,18 +75,14 @@ set_source_files_properties(
) )
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# substitute @EXECUTABLE@ in dist/mac/Info.plist # provide variables for substitution in dist/mac/Info.plist
get_target_property(EXECUTABLE qbt_app OUTPUT_NAME) get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME)
configure_file(${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist # This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813
${qBittorrent_BINARY_DIR}/dist/mac/pregen.plist @ONLY) set(MACOSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
file(GENERATE
OUTPUT ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist
INPUT ${qBittorrent_BINARY_DIR}/dist/mac/pregen.plist
)
set_target_properties(qbt_app PROPERTIES set_target_properties(qbt_app PROPERTIES
MACOSX_BUNDLE ON MACOSX_BUNDLE ON
MACOSX_BUNDLE_BUNDLE_NAME "qBittorrent" MACOSX_BUNDLE_BUNDLE_NAME "qBittorrent"
MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist
) )
target_sources(qbt_app PRIVATE target_sources(qbt_app PRIVATE
${QT_TRANSLATIONS} ${QT_TRANSLATIONS}

Loading…
Cancel
Save