diff options
author | crupest <crupest@outlook.com> | 2019-03-30 21:04:42 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-03-30 21:04:42 +0800 |
commit | ee130224147f034e02d1d4d83e3f2d5a59e625c2 (patch) | |
tree | 79d73bb5c5b3e29657d31a90d45ff7d20c3c5041 /CMakeLists.txt | |
parent | 88ecaa7f4f82b390cbda838b68121e93f878c299 (diff) | |
download | cru-ee130224147f034e02d1d4d83e3f2d5a59e625c2.tar.gz cru-ee130224147f034e02d1d4d83e3f2d5a59e625c2.tar.bz2 cru-ee130224147f034e02d1d4d83e3f2d5a59e625c2.zip |
Link skia.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index df3e99f9..7f932f0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,23 @@ cmake_minimum_required(VERSION 3.12) # use 3.12 because VS internal cmake is 3.1 project(CruUI) + +if(NOT CRU_CPU_ARCH) + set(CRU_CPU_ARCH x64) + message(STATUS "CPU arch not specified, use x64.") +endif() + set(CMAKE_CXX_STANDARD 17) +add_library(skia STATIC IMPORTED) +if(${CRU_SKIA_USE_CLANG}) + set_target_properties(skia PROPERTIES IMPORTED_LOCATION_DEBUG ${PROJECT_SOURCE_DIR}/skia/out/Debug_${CRU_CPU_ARCH}_clang/skia.lib + IMPORTED_LOCATION_RELEASE ${PROJECT_SOURCE_DIR}/skia/out/Release_${CRU_CPU_ARCH}_clang/skia.lib) +else() + set_target_properties(skia PROPERTIES IMPORTED_LOCATION_DEBUG ${PROJECT_SOURCE_DIR}/skia/out/Debug_${CRU_CPU_ARCH}/skia.lib + IMPORTED_LOCATION_RELEASE ${PROJECT_SOURCE_DIR}/skia/out/Release_${CRU_CPU_ARCH}/skia.lib) +endif() + +target_include_directories(skia INTERFACE skia/include) + add_subdirectory(src) |