Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

[macos] Refactor code duplication in macos min version specification

Dmitry Kazakov9e02afe46161
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 989f7af4ce..3140069ca2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,10 +89,11 @@ if (APPLE)
set(BUILD_WITH_INSTALL_RPATH 1)
set(MACOS_GUI_TEST "GUI")
if (BUILD_WITH_QT6)
- add_definitions(-mmacosx-version-min=12 -Wno-macro-redefined -Wno-deprecated-register)
+ set(MACOS_MINIMUM_VERSION 12)
else()
- add_definitions(-mmacosx-version-min=10.14 -Wno-macro-redefined -Wno-deprecated-register)
+ set(MACOS_MINIMUM_VERSION 10.14)
endif()
+ add_definitions(-mmacosx-version-min=${MACOS_MINIMUM_VERSION} -Wno-macro-redefined -Wno-deprecated-register)
if (CMAKE_OSX_ARCHITECTURES)
message(STATUS "CMake OSX architectures: ${CMAKE_OSX_ARCHITECTURES}")
endif()
diff --git a/krita/CMakeLists.txt b/krita/CMakeLists.txt
index 81f2a9884b..5bd5f4520f 100644
--- a/krita/CMakeLists.txt
+++ b/krita/CMakeLists.txt
@@ -138,11 +138,6 @@ if (APPLE)
set_target_properties(krita PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING ${KRITA_VERSION_NUMBER_STRING})
set_target_properties(krita PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION ${KRITA_VERSION_NUMBER_STRING})
set_target_properties(krita PROPERTIES MACOSX_BUNDLE_COPYRIGHT "GNU Public License, V2 or, at your option, any later version.")
- if (QT_MAJOR_VERSION STREQUAL "6")
- set(MACOS_MINIMUM_VERSION 12)
- else()
- set(MACOS_MINIMUM_VERSION 10.14)
- endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
endif ()