Skip to content

Commit

Permalink
Merge pull request #14813 from Kolcha/cmake_mac
Browse files Browse the repository at this point in the history
Set correct minimum macOS version with CMake
  • Loading branch information
Chocobo1 authored Apr 26, 2021
2 parents d0dcf53 + 28ef33b commit ab6141e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<key>CFBundleShortVersionString</key>
<string>4.4.0</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.qbittorrent.qBittorrent</string>
<key>LSMinimumSystemVersion</key>
Expand Down
14 changes: 5 additions & 9 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,14 @@ set_source_files_properties(
)

if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# substitute @EXECUTABLE@ in dist/mac/Info.plist
get_target_property(EXECUTABLE qbt_app OUTPUT_NAME)
configure_file(${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist
${qBittorrent_BINARY_DIR}/dist/mac/pregen.plist @ONLY)
file(GENERATE
OUTPUT ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist
INPUT ${qBittorrent_BINARY_DIR}/dist/mac/pregen.plist
)
# provide variables for substitution in dist/mac/Info.plist
get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME)
# This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813
set(MACOSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
set_target_properties(qbt_app PROPERTIES
MACOSX_BUNDLE ON
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
${QT_TRANSLATIONS}
Expand Down

0 comments on commit ab6141e

Please sign in to comment.