From a2388abeca837321aa471b6cbf537764ca582cfa Mon Sep 17 00:00:00 2001 From: Wang Fenjin Date: Fri, 21 Oct 2022 19:05:14 +0800 Subject: [PATCH] fix osx minimum version (#105) * fix osx minimum version * fix comment * move windows after project --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0e8888..bb6430e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,8 @@ cmake_minimum_required(VERSION 3.19) -project(simple-tokenizer) set(CMAKE_CXX_STANDARD 14) set(CXX_STANDARD_REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") -if (MSVC) - # https://stackoverflow.com/a/65128497/1203241 - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - set(BUILD_SHARED_LIBS TRUE) - add_compile_options("$<$:/utf-8>") -endif() - if (APPLE) set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version") @@ -22,6 +14,16 @@ if (IOS) ) endif() +# put project after CMAKE_OSX_DEPLOYMENT_TARGET +project(simple-tokenizer) + +if (MSVC) + # https://stackoverflow.com/a/65128497/1203241 + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + set(BUILD_SHARED_LIBS TRUE) + add_compile_options("$<$:/utf-8>") +endif() + set(SQLITE3_HEADERS_DIR ${PROJECT_SOURCE_DIR}/contrib/sqlite3) set(SIMPLE_HEADERS_DIR ${PROJECT_SOURCE_DIR}/src)