-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
32 lines (26 loc) · 1.18 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
cmake_minimum_required(VERSION 3.8)
project("chino")
# Download automatically, you can also just copy the conan.cmake file
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.14/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()
# include(${CMAKE_BINARY_DIR}/conan.cmake)
# conan_check()
# conan_add_remote(NAME bincrafts URL https://api.bintray.com/conan/bincrafters/public-conan)
# conan_cmake_run(CONANFILE conanfile.txt
# BASIC_SETUP CMAKE_TARGETS
# BUILD missing)
include(ExternalProject)
set(THIRD_PARTY ${CMAKE_CURRENT_LIST_DIR}/third_party)
set(CMAKE_CXX_STANDARD 17)
if (MSVC)
add_definitions(/D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /DNOMINMAX /DUNICODE)
add_compile_options(/Zc:threadSafeInit- /wd4102 /wd4200 /wd4533)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
else()
add_compile_options(-Wno-multichar)
endif()
add_subdirectory(src/Native)