-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
168 lines (138 loc) · 5.1 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
## #################################################################
## Root CMakeLists.txt
## #################################################################
cmake_minimum_required(VERSION 3.0)
project(babyxrc)
if(CMAKE_SYSTEM_NAME MATCHES Windows)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
# Build the Baby X resource compiler
file( GLOB BBX_COMMON src/*.c )
file( GLOB BBX_COMMONH src/*.h )
file( GLOB BBX_FREETYPE src/freetype/*.c )
file( GLOB BBX_FREETYPEH src/freetype/*.h )
file( GLOB BBX_SAMPLERATE src/samplerate/*.c )
file( GLOB BBX_SAMPLERATEH src/samplerate/*.h )
set( bbx_includes "")
set( bbx_sources "")
list(APPEND bbx_sources ${BBX_COMMON} )
list(APPEND bbx_sources ${BBX_COMMONH} )
list(APPEND bbx_includes "src")
list(APPEND bbx_sources ${BBX_FREETYPE} )
list(APPEND bbx_sources ${BBX_FREETYPEH} )
list(APPEND bbx_sources ${BBX_SAMPLERATE} )
list(APPEND bbx_sources ${BBX_SAMPLERATEH} )
list(APPEND bbx_includes "src/freetype" )
list(APPEND bbx_includes "src/samplerate" )
set( libs "")
if(CMAKE_SYSTEM_NAME MATCHES Linux)
list(APPEND libs m)
endif()
source_group("freetype" FILES ${BBX_FREETYPE} )
source_group("freetype" FILES ${BBX_FREETYPEH} )
source_group("samplerate" FILES ${BBX_SAMPLERATE} )
source_group("samplerate" FILES ${BBX_SAMPLERATEH} )
add_executable( "babyxrc" ${bbx_sources} ${bbx_headers} )
target_link_libraries( "babyxrc" ${libs} )
# Baby X file system programs
file( GLOB BBX_SHELL babyxfs_src/shell/*.c )
file( GLOB BBX_SHELLH babyxfs_src/shell/*.h )
set( bbx_shell_includes "")
set( bbx_shell_sources "")
list(APPEND bbx_shell_includes "babyxfs_src")
list(APPEND bbx_shell_sources ${BBX_SHELL} )
list(APPEND bbx_shell_sources ${BBX_SHELLH} )
list(APPEND bbx_shell_includes "babyxfs_src" )
add_executable("testbabyxfilesystem"
"babyxfs_src/bbx_write_source_archive.c"
"babyxfs_src/bbx_write_source_archive.h"
"babyxfs_src/bbx_filesystem.c"
"babyxfs_src/bbx_filesystem.h"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/testbabyxfilesystem.c")
target_link_libraries( "testbabyxfilesystem" ${libs} )
add_executable("rot13"
"babyxfs_src/rot13.c")
target_link_libraries( "rot13" ${libs} )
add_executable("bbx_ls"
"babyxfs_src/strnatcmp.c"
"babyxfs_src/strnatcmp.h"
"babyxfs_src/readdirectory_posix.c"
"babyxfs_src/is_directory_posix.c"
"babyxfs_src/bbx_options.c"
"babyxfs_src/bbx_options.h"
"babyxfs_src/bbx_ls.c")
target_link_libraries( "rot13" ${libs} )
add_executable("babyxfs_escapexml"
"babyxfs_src/babyxfs_escapexml.c")
target_link_libraries( "babyxfs_escapexml" ${libs} )
add_executable("babyxfs_extract"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/bbx_filesystem.c"
"babyxfs_src/bbx_filesystem.h"
"babyxfs_src/bbx_write_source_archive.c"
"babyxfs_src/bbx_write_source_archive.h"
"babyxfs_src/babyxfs_extract.c")
target_link_libraries( "babyxfs_extract" ${libs} )
add_executable("babyxfs_ls"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/bbx_write_source_archive.c"
"babyxfs_src/bbx_write_source_archive.h"
"babyxfs_src/bbx_filesystem.c"
"babyxfs_src/bbx_filesystem.h"
"babyxfs_src/bbx_options.c"
"babyxfs_src/bbx_options.h"
"babyxfs_src/babyxfs_ls.c")
target_link_libraries( "babyxfs_ls" ${libs} )
add_executable("babyxfs_rm"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/bbx_write_source_archive.c"
"babyxfs_src/bbx_write_source_archive.h"
"babyxfs_src/bbx_filesystem.c"
"babyxfs_src/bbx_filesystem.h"
"babyxfs_src/babyxfs_rm.c")
target_link_libraries( "babyxfs_rm" ${libs} )
add_executable("babyxfs_insert"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/bbx_write_source_archive.c"
"babyxfs_src/bbx_write_source_archive.h"
"babyxfs_src/bbx_filesystem.c"
"babyxfs_src/bbx_filesystem.h"
"babyxfs_src/babyxfs_insert.c")
target_link_libraries( "babyxfs_insert" ${libs} )
add_executable("babyxfs_shell"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/bbx_write_source_archive.c"
"babyxfs_src/bbx_write_source_archive.h"
"babyxfs_src/bbx_filesystem.c"
"babyxfs_src/bbx_filesystem.h"
"babyxfs_src/bbx_options.c"
"babyxfs_src/bbx_options.h"
${bbx_shell_sources})
target_include_directories(babyxfs_shell PRIVATE ${bbx_shell_includes})
target_link_libraries( "babyxfs_shell" ${libs} )
add_executable("babyxfs_test"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/bbx_write_source_archive.c"
"babyxfs_src/bbx_write_source_archive.h"
"babyxfs_src/babyxfs_test.c")
target_link_libraries( "babyxfs_test" ${libs} )
add_executable("babyxfs_dirtoxml"
"babyxfs_src/babyxfs_dirtoxml.c")
target_link_libraries( "babyxfs_dirtoxml" ${libs} )
add_executable("babyxfs_xmltodir"
"babyxfs_src/asciitostring.c"
"babyxfs_src/asciitostring.h"
"babyxfs_src/xmlparser2.c"
"babyxfs_src/xmlparser2.h"
"babyxfs_src/bbx_write_source.c"
"babyxfs_src/bbx_write_source.h"
"babyxfs_src/babyxfs_xmltodir.c")
target_link_libraries( "babyxfs_xmltodir" ${libs} )