@@ -5,8 +5,27 @@ project(picasso LANGUAGES C CXX ASM HOMEPAGE_URL https://onecoolx.github.io/pica
5
5
set (BUILD_SHARED_LIBS ON ) # build shared library, OFF for static
6
6
7
7
set (PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR} )
8
+ set (PROJECT_OUT ${CMAKE_CURRENT_BINARY_DIR} )
8
9
9
- set (VERSION_INFO 2.8.0)
10
+ set (VERSION_MAJOR 2)
11
+ set (VERSION_MINOR 8)
12
+ set (VERSION_MICRO 0)
13
+ set (VERSION_INFO ${VERSION_MAJOR} .${VERSION_MINOR} .${VERSION_MICRO} )
14
+
15
+ option (OPT_FORMAT_ABGR "Pixel format ABGR support." ON )
16
+ option (OPT_FORMAT_ARGB "Pixel format ARGB support." ON )
17
+ option (OPT_FORMAT_BGRA "Pixel format BGRA support." ON )
18
+ option (OPT_FORMAT_RGBA "Pixel format RGBA support." ON )
19
+ option (OPT_FORMAT_RGB "Pixel format RGB support." ON )
20
+ option (OPT_FORMAT_BGR "Pixel format BGR support." ON )
21
+ option (OPT_FORMAT_RGB565 "Pixel format RGB565 support." ON )
22
+ option (OPT_FORMAT_RGB555 "Pixel format RGB555 support." ON )
23
+
24
+ option (OPT_FAST_COPY "Build Fast Memory Copy used support." ON )
25
+ option (OPT_FREE_TYPE2 "Build FreeType2 is support." OFF )
26
+ option (OPT_FONT_CONFIG "Build FontConfig is support." OFF )
27
+ option (OPT_LOW_MEMORY "Build Low Memory used support." OFF )
28
+ option (OPT_SYSTEM_MALLOC "Build System Memory Allocator (new/delete/malloc/free/realloc/calloc) used support." OFF )
10
29
11
30
if (NOT CMAKE_BUILD_TYPE )
12
31
set (CMAKE_BUILD_TYPE Debug CACHE STRING "Build Type" FORCE)
@@ -21,3 +40,63 @@ include (${CMAKE_CURRENT_LIST_DIR}/include/include.cmake)
21
40
include (${CMAKE_CURRENT_LIST_DIR} /test /test .cmake)
22
41
include (${CMAKE_CURRENT_LIST_DIR} /demos/demos.cmake)
23
42
43
+ include (CheckIncludeFile)
44
+ check_include_file(stdint.h HAVE_STDINT_H)
45
+
46
+ if (OPT_FORMAT_ABGR)
47
+ set (ENABLE_FORMAT_ABGR 1)
48
+ endif (OPT_FORMAT_ABGR)
49
+
50
+ if (OPT_FORMAT_ARGB)
51
+ set (ENABLE_FORMAT_ARGB 1)
52
+ endif (OPT_FORMAT_ARGB)
53
+
54
+ if (OPT_FORMAT_BGRA)
55
+ set (ENABLE_FORMAT_BGRA 1)
56
+ endif (OPT_FORMAT_BGRA)
57
+
58
+ if (OPT_FORMAT_RGBA)
59
+ set (ENABLE_FORMAT_RGBA 1)
60
+ endif (OPT_FORMAT_RGBA)
61
+
62
+ if (OPT_FORMAT_RGB)
63
+ set (ENABLE_FORMAT_RGB 1)
64
+ endif (OPT_FORMAT_RGB)
65
+
66
+ if (OPT_FORMAT_BGR)
67
+ set (ENABLE_FORMAT_BGR 1)
68
+ endif (OPT_FORMAT_BGR)
69
+
70
+ if (OPT_FORMAT_RGB565)
71
+ set (ENABLE_FORMAT_RGB565 1)
72
+ endif (OPT_FORMAT_RGB565)
73
+
74
+ if (OPT_FORMAT_RGB555)
75
+ set (ENABLE_FORMAT_RGB555 1)
76
+ endif (OPT_FORMAT_RGB555)
77
+
78
+ if (OPT_FAST_COPY)
79
+ set (ENABLE_FAST_COPY 1)
80
+ endif (OPT_FAST_COPY)
81
+
82
+ if (OPT_FREE_TYPE2)
83
+ set (ENABLE_FREE_TYPE2 1)
84
+ endif (OPT_FREE_TYPE2)
85
+
86
+ if (OPT_FONT_CONFIG)
87
+ set (ENABLE_FONT_CONFIG 1)
88
+ endif (OPT_FONT_CONFIG)
89
+
90
+ if (OPT_LOW_MEMORY)
91
+ set (ENABLE_LOW_MEMORY 1)
92
+ endif (OPT_LOW_MEMORY)
93
+
94
+ if (OPT_SYSTEM_MALLOC)
95
+ set (ENABLE_SYSTEM_MALLOC 1)
96
+ endif (OPT_SYSTEM_MALLOC)
97
+
98
+ configure_file (
99
+ "${PROJECT_ROOT} /build/pconfig.h.in"
100
+ "${PROJECT_OUT} /include/pconfig.h"
101
+ )
102
+
0 commit comments