-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
179 lines (148 loc) · 4.91 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
167
168
169
170
171
172
173
174
175
176
177
178
#############################################################################
# The Falcon Programming language
#
# CMake configuration file for Core falcon
##############################################################################
#
## Control Variables
#
# FALCON_BIN_DIR - Prefix for binary installation. Defaults to "bin"
# FALCON_INC_DIR - Prefix for installation of include files.
# FALCON_LIB_DIR - Prefix for installation of archives and dynamic libraries
# on UNIXes. Defaults to "lib".
# FALCON_MOD_DIR - Prefix for installation of modules. Defaults to
# $FALCON_LIB_DIR/falcon on UNICES, and bin/ on windows.
# FALCON_MAN_DIR - Where manual pages are stored (below prefix)
# FALCON_SHARE_DIR - Where to install falcon share files
# FALCON_CMAKE_DIR - Where to install FalconConfig.cmake & c
#
## Options
#
# FALCON_SKIP_BISON - Turn ON to avoid using bison.
# FALCON_WITH_MANPAGES - Turn ON to build and install man pages.
# FALCON_BUILD_FEATHERS - Turn OFF to skip building Feathers.
# FALCON_BUILD_MODULES - Turn OFF to skip building Falcon modules.
# FALCON_BUILD_NATMODS - Turn OFF to skip building other binary native modules.
# FALCON_BUILD_APPS - Turn ON to install installing Falcon applications.
# FALCON_BUILD_FWKS - Turn OFF to skip installing Falcon frameworks.
# FALCON_BUILD_DOCS - Build automatic documentation
#
## Options For Native Modules
#
# FALCON_BUILD_*MODULE_NAME* - ON to build a given module
#
# List of available modules: CURL DBI DBUS DYNLIB GD2 GTK PDF SDL
#
cmake_minimum_required(VERSION 2.6.2)
project(Falcon)
##################################################################
# Falcon build environment setup
set(Falcon_IN_CORE_SOURCETREE on)
# Find the module for cmake that we generate before install
set( Falcon_DIR "${CMAKE_CURRENT_BINARY_DIR}/devtools" )
#set( faldoc_DIR "${CMAKE_CURRENT_BINARY_DIR}/apps/faldoc")
# Add source include files at those generated by the module
list(APPEND Falcon_INCLUDE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/modules/native/feathers/include"
)
include(detail.cmake)
##################################################################
# CMAKE environment setup
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
#########################################################à
# List of files to be installed as docs
#
set( doc_files
AUTHORS
BUILDING
ChangeLog
copyright
LICENSE
README
README.editline
README.mersenne
TODO
LICENSE_GPLv2
RELNOTES
)
install(
FILES ${doc_files}
DESTINATION ${FALCON_SHARE_DIR} )
#########################################################à
# Subdirectories
#
#collect the include files in FALCON_HEADER
add_subdirectory(include)
#
add_subdirectory(engine)
add_subdirectory(clt)
#
add_subdirectory(devtools)
add_custom_target(falcon-core)
#########################################################################
# Feathers?
#
if( FALCON_BUILD_FEATHERS )
message( STATUS "Adding FEATHERS to this build" )
#override settings for the include dirs
list( APPEND Falcon_INCLUDE_DIRS
"${CMAKE_CURRENT_BINARY_DIR}/include" )
add_subdirectory( modules/native/feathers )
else()
message( STATUS "Not building feathers" )
endif()
#########################################################################
# Modules?
#
if( FALCON_BUILD_NATMODS )
message( STATUS "Adding native binary modules to this build" )
add_subdirectory( modules/native )
else()
message( STATUS "Not building binary native modules" )
endif()
if( FALCON_BUILD_MODULES )
message( STATUS "Adding Falcon modules to this build" )
add_subdirectory( modules/falcon )
else()
message( STATUS "Not building modules" )
endif()
if( FALCON_BUILD_FWKS )
message( STATUS "Adding frameworks to this build" )
add_subdirectory( frameworks )
else()
message( STATUS "Not building frameworks" )
endif()
if( FALCON_BUILD_APPS )
message( STATUS "Adding applications to this build" )
add_subdirectory( apps )
else()
message( STATUS "Not building applications" )
endif()
if( FALCON_BUILD_DOCS )
message( STATUS "Adding documentation to this build" )
add_subdirectory( docs )
else()
message( STATUS "Not building documentation" )
endif()
#Generate make distro scripts
if( FALCON_BUILD_DIST )
add_subdirectory( dist )
endif()
if( FALCON_INSTALL_TESTS )
message( STATUS "Adding (source) tests, samples and demos to the distribution" )
add_subdirectory( tests )
else()
message( STATUS "Not installing tests" )
endif()
# CMake generated information. Is used by our falcon-config.cmake
if (NOT FALCON_CMAKE_DIR)
if(WIN32)
set(FALCON_CMAKE_DIR cmake)
else()
set(FALCON_CMAKE_DIR ${FALCON_SHARE_DIR}/cmake)
endif()
endif()
install(EXPORT falcon-core-targets
DESTINATION ${FALCON_CMAKE_DIR}
)