-
Notifications
You must be signed in to change notification settings - Fork 16
/
modules.cmake
executable file
·96 lines (77 loc) · 2.45 KB
/
modules.cmake
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# Clever programming language
# Copyright (c) Clever Team
#
# modules.cmake - Module options and other stuff
#
# Modules
# ---------------------------------------------------------------------------
# heuripedes: pay attention to the order in which you check the modules.
# keep in mind that the check is recursive.
clever_new_module(std.date ON DOC "enable the date module")
clever_new_module(std.concurrent ON
DOC "enable the concurrent module"
LIBS PTHREAD)
clever_new_module(std.net ON DOC "enable the net module")
clever_new_module(std.clever ON DOC "enable the clever module")
clever_new_module(std.file ON DOC "enable the file module")
clever_new_module(std.io ON DOC "enable the io module")
clever_new_module(std.json ON DOC "enable the json module")
clever_new_module(std.math ON DOC "enable the math module")
clever_new_module(std.reflection ON DOC "enable the reflection module")
clever_new_module(std.sys ON DOC "enable the sys module")
clever_new_module(std.crypto ON DOC "enable the crypto module")
clever_new_module(std.collection ON DOC "enable the collection module")
clever_new_module(std.getopt ON DOC "enable the getopt module")
clever_new_module(std.regex ON
DOC "enable the regex module"
LIBS PCRECPP)
clever_new_module(std.ffi ON
DOC "enable the ffi module"
LIBS FFI)
clever_new_module(std.unicode ON
DOC "enable the unicode module"
LIBS ICU)
clever_new_module(std.fcgi OFF
DOC "enable the fcgi module"
LIBS FCGI)
clever_new_module(std.events ON
DOC "enable the event module"
MODS std.concurrent)
clever_new_module(db.mysql ON
DOC "enable the mysql module"
LIBS MYSQLC)
clever_new_module(db.sqlite3 ON
DOC "enable the sqlite3 module"
LIBS SQLITE3)
clever_new_module(gui.ncurses ON
DOC "enable the ncurses module"
LIBS NCURSES
)
# std.concurrent
clever_module_check(std.concurrent)
if(STD_CONCURRENT AND UNIX)
list(APPEND STD_CONCURRENT_LIB_DEPENDS PTHREAD)
clever_module_check(std.concurrent)
add_definitions(-pthread)
list(APPEND CLEVER_LIBRARIES dl)
endif()
# std.ffi
clever_module_check(std.ffi)
if(STD_FFI)
add_definitions(-pthread)
list(APPEND CLEVER_LIBRARIES dl)
endif()
# std.net
clever_module_check(std.net)
if(STD_NET)
if (MSVC)
list(APPEND CLEVER_LIBRARIES ws2_32)
elseif(HAIKU)
list(APPEND CLEVER_LIBRARIES network)
endif()
endif()
# check the remaining modules
foreach(_modname ${CLEVER_AVAILABLE_MODULES})
clever_module_check(${_modname})
endforeach()