Skip to content

Commit

Permalink
fix osx minimum version (#105)
Browse files Browse the repository at this point in the history
* fix osx minimum version

* fix comment

* move windows after project
  • Loading branch information
wangfenjin authored Oct 21, 2022
1 parent b508e13 commit a2388ab
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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("$<$<C_COMPILER_ID:MSVC>:/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")
Expand All @@ -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("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
endif()

set(SQLITE3_HEADERS_DIR ${PROJECT_SOURCE_DIR}/contrib/sqlite3)
set(SIMPLE_HEADERS_DIR ${PROJECT_SOURCE_DIR}/src)

Expand Down

0 comments on commit a2388ab

Please sign in to comment.