-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
52 lines (38 loc) · 1.41 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.20)
project(davinci LANGUAGES C CXX ASM HOMEPAGE_URL https://github.com/onecoolx/davinci)
set(BUILD_SHARED_LIBS ON) # build shared library, OFF for static
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(PROJECT_OUT ${CMAKE_CURRENT_BINARY_DIR})
set(VERSION_MAJOR 2)
set(VERSION_MINOR 0)
set(VERSION_MICRO 0)
set(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO})
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
if(POLICY CMP0114)
cmake_policy(SET CMP0114 NEW)
endif()
option(OPT_SYSTEM_MALLOC "Build System Memory Allocator (new/delete/malloc/free/realloc/calloc) used support." OFF)
option(OPT_UNITTEST "Build Unit tests" OFF)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build Type" FORCE)
endif()
include (${CMAKE_CURRENT_LIST_DIR}/build/configs.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/build/defines.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/third_party/third_party.cmake)
#include (${CMAKE_CURRENT_LIST_DIR}/src/src.cmake)
#include (${CMAKE_CURRENT_LIST_DIR}/demos/demos.cmake)
if (OPT_UNITTEST)
enable_testing()
#include (${CMAKE_CURRENT_LIST_DIR}/unittest/unittest.cmake)
endif(OPT_UNITTEST)
include(CheckIncludeFile)
check_include_file(stdint.h HAVE_STDINT_H)
if (OPT_SYSTEM_MALLOC)
set(ENABLE_SYSTEM_MALLOC 1)
endif(OPT_SYSTEM_MALLOC)
configure_file(
"${PROJECT_ROOT}/build/mconfig.h.in"
"${PROJECT_OUT}/include/mconfig.h"
)