From 8adc74e242ee6305d4a9016b1e6f31036b742067 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 20 Sep 2020 14:25:18 +0300 Subject: macOS: No fixed deployment target Let the user decide. --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bac42be..23ba80f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,6 @@ # - `cat` is relied upon for merging all the resource files together. cmake_minimum_required (VERSION 3.9) -set (CMAKE_OSX_DEPLOYMENT_TARGET 10.14) project (Lagrange VERSION 0.3.0 @@ -189,8 +188,10 @@ if (APPLE) else () target_link_libraries (app PUBLIC "-framework AppKit") endif () - target_compile_options (app PUBLIC -mmacosx-version-min=10.14) - target_link_options (app PUBLIC -mmacosx-version-min=10.14) + if (CMAKE_OSX_DEPLOYMENT_TARGET) + target_compile_options (app PUBLIC -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) + target_link_options (app PUBLIC -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) + endif () set_target_properties (app PROPERTIES OUTPUT_NAME "Lagrange" BUILD_RPATH ${SDL2_LIBRARY_DIRS} -- cgit v1.2.3