Skip to content

Commit

Permalink
build: use osx target 10.15 for Qt6 on Mac [skip ci] (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Jun 6, 2022
1 parent b3a6d17 commit 29b40f9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ if(NOT
set(ICON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Resources/${ICON_NAME})
endif()

if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14)
endif()

if(MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /experimental:external /external:W0 ")
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "/external:I ")
Expand Down Expand Up @@ -197,6 +193,15 @@ set(KLOGG_QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
message("Qt version ${KLOGG_QT_VERSION}")
message("LTO ${KLOGG_USE_LTO}")

if(APPLE)
if(${QT_VERSION_MAJOR} STREQUAL "6")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14)
endif()
message("OSX target ${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()

set(CMAKE_AUTOMOC OFF)
set(CMAKE_INCLUDE_CURRENT_DIR OFF)
set(BUILD_SHARED_LIBS OFF)
Expand Down

0 comments on commit 29b40f9

Please sign in to comment.