Skip to content

Commit

Permalink
Merge pull request #7172 from nextcloud/bugfix/min-version-macos
Browse files Browse the repository at this point in the history
Fix issues with minimum system versions and deployment targets on macOS
  • Loading branch information
mgallien authored Sep 23, 2024
2 parents 59501ac + 9455dcf commit 0eb0774
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy(SET CMP0071 NEW) # Enable use of QtQuick compiler/generated code
project(client)

if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum OSX deployment version")
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Minimum OSX deployment version")
endif()

set(CMAKE_CXX_STANDARD 17)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/MacOSXBundleInfo.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<string>11.0</string>
<key>LSUIElement</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
Expand Down
2 changes: 1 addition & 1 deletion craftmaster.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CreateCache = False
# Category is case sensitive
[GeneralSettings]

General/MacDeploymentTarget = 12.0
General/MacDeploymentTarget = 11.0

Compile/BuildType = RelWithDebInfo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -1004,7 +1004,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -1259,7 +1259,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1310,7 +1310,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand Down Expand Up @@ -1365,7 +1365,7 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
OC_APPLICATION_NAME = ownCloud;
OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
Expand Down Expand Up @@ -1419,7 +1419,7 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
OC_APPLICATION_NAME = ownCloud;
OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
Expand Down
6 changes: 2 additions & 4 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ IF( APPLE )
list(APPEND client_SRCS cocoainitializer_mac.mm)
list(APPEND client_SRCS systray_mac_common.mm)

if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.14)
list(APPEND client_SRCS systray_mac_usernotifications.mm)
endif()
list(APPEND client_SRCS systray_mac_usernotifications.mm)

if (BUILD_FILE_PROVIDER_MODULE)
list(APPEND client_SRCS
Expand Down Expand Up @@ -706,7 +704,7 @@ endif()
if (APPLE)
if (BUILD_FILE_PROVIDER_MODULE)
target_link_libraries(nextcloudCore PUBLIC "-framework UserNotifications -framework FileProvider")
elseif(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.14)
else()
target_link_libraries(nextcloudCore PUBLIC "-framework UserNotifications")
endif()
endif()
Expand Down

0 comments on commit 0eb0774

Please sign in to comment.