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)