Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 651 lines (516 sloc) 19.574 kB
43cc089 @aristidb build: add license headers
aristidb authored
1 # vim:ts=4:sw=4:expandtab:autoindent:
2 #
1308585 copyright: note in each file that it is actually the MIT License
Aristid Breitkreuz authored
3 # The MIT License
4 #
e064ad6 @aristidb copyright: reference CONTRIBUTORS instead of listing an arbitrary par…
aristidb authored
5 # Copyright (c) 2008, 2009 Flusspferd contributors (see "CONTRIBUTORS" or
6 # http://flusspferd.org/contributors.txt)
43cc089 @aristidb build: add license headers
aristidb authored
7 #
8 # Permission is hereby granted, free of charge, to any person obtaining a copy
9 # of this software and associated documentation files (the "Software"), to deal
10 # in the Software without restriction, including without limitation the rights
11 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 # copies of the Software, and to permit persons to whom the Software is
13 # furnished to do so, subject to the following conditions:
1308585 copyright: note in each file that it is actually the MIT License
Aristid Breitkreuz authored
14 #
43cc089 @aristidb build: add license headers
aristidb authored
15 # The above copyright notice and this permission notice shall be included in
16 # all copies or substantial portions of the Software.
1308585 copyright: note in each file that it is actually the MIT License
Aristid Breitkreuz authored
17 #
43cc089 @aristidb build: add license headers
aristidb authored
18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 # THE SOFTWARE.
25 #
26
ad2ae52 @aristidb build/encodings: fixed check for iconv, also check if iconv accepts c…
aristidb authored
27 project(Flusspferd)
fc351d2 @aristidb build: add PROJECT() line
aristidb authored
28
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
29 cmake_minimum_required(VERSION 2.6)
720d7ff @aristidb build: use FindBoost module of cmake 2.6
aristidb authored
30
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
31 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
32 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules)
3b76466 @aristidb build: at least improve the syntax a little bit
aristidb authored
33
1df5b0f @aristidb build: set the default build type to Debug
aristidb authored
34 if(NOT CMAKE_BUILD_TYPE)
35 set(
36 CMAKE_BUILD_TYPE
37 Debug
38 CACHE
39 STRING
40 "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
41 FORCE)
42 endif()
43
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
44 message(STATUS "Source: ${CMAKE_SOURCE_DIR}")
45 message(STATUS "Binary: ${CMAKE_BINARY_DIR}")
46
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
47 if(${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
48 message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files that cmake just created:\nrm -rf CMakeCache.txt CMakeFiles")
49 endif()
1155c22 @aristidb build: search for boost
aristidb authored
50
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
51 set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
52 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
16119fc @aristidb build: set LIBRARY_ and EXECUTABLE_OUTPUT_PATH
aristidb authored
53
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
54 set(INSTALL_EXECUTABLES_PATH ${CMAKE_INSTALL_PREFIX}/bin)
55 set(INSTALL_LIBRARIES_PATH ${CMAKE_INSTALL_PREFIX}/lib)
56 set(INSTALL_LIBDATA_PATH ${CMAKE_INSTALL_PREFIX}/lib/flusspferd)
57 set(INSTALL_MODULES_PATH ${CMAKE_INSTALL_PREFIX}/lib/flusspferd/modules)
58 set(INSTALL_HEADERS_PATH ${CMAKE_INSTALL_PREFIX}/include)
59 set(INSTALL_ETC_PATH ${CMAKE_INSTALL_PREFIX}/etc)
80fc705 @aristidb build: improve installation procedure for libflusspferd and flusspfer…
aristidb authored
60
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
61 execute_process(
d4b27b6 @aristidb build: fix typo
aristidb authored
62 COMMAND "${Flusspferd_SOURCE_DIR}/flusspferd-version.sh"
63 WORKING_DIRECTORY "${Flusspferd_SOURCE_DIR}"
1c2a381 @aristidb build: cmake now recognizes flusspferd's version
aristidb authored
64 OUTPUT_VARIABLE FLUSSPFERD_VERSION
65 OUTPUT_STRIP_TRAILING_WHITESPACE)
66
489b1b3 Set default FLUSSPFERD_VERSION to 'unknown'
unknown authored
67 if(NOT FLUSSPFERD_VERSION)
68 set(FLUSSPFERD_VERSION unknown)
69 endif()
70
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
71 add_definitions("-DFLUSSPFERD_VERSION=\"${FLUSSPFERD_VERSION}\"")
72 add_definitions("-DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
2b6333a @aristidb build: compile libflusspferd
aristidb authored
73
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
74 message(STATUS "Flusspferd Version " ${FLUSSPFERD_VERSION})
1c2a381 @aristidb build: cmake now recognizes flusspferd's version
aristidb authored
75
a7c1697 @ashb build: various platform specific checks for getting hold of exe name
ashb authored
76 option(RELOCATABLE "Whether the binary should be relocatable" ON)
1b07c16 build: add option for whether flusspferd should be relocatable
Aristid Breitkreuz authored
77
78 if(RELOCATABLE)
79 add_definitions("-DFLUSSPFERD_RELOCATABLE")
80 endif()
81
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
82 set(CMAKE_SHARED_MODULE_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
83 add_definitions("-DFLUSSPFERD_MODULE_SUFFIX=\"${CMAKE_SHARED_MODULE_SUFFIX}\"")
6b4cbd8 @aristidb build/modules: explicitly set and use module suffix, consistently
aristidb authored
84
7686863 @aristidb build: -DDEBUG for debug builds
aristidb authored
85 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
86 add_definitions("-DDEBUG")
87 endif()
88
7541210 @aristidb build: longer divider comment lines
aristidb authored
89 #############################################################################
f2ba500 @aristidb build: check for POSIX
aristidb authored
90
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
91 include(CheckIncludeFile)
92 include(CheckCXXCompilerFlag)
93 include(CheckCXXSourceCompiles)
94 include(CheckCXXSourceRuns)
95 include(FindPkgConfig)
f2ba500 @aristidb build: check for POSIX
aristidb authored
96
3622957 @aristidb build: comment line was too short
aristidb authored
97 ## Compiler options #########################################################
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
98
4445d48 @aristidb Don't build tests on WIN32 by default
aristidb authored
99 if(WIN32)
100 set(_ENABLE_TESTS_DEFAULT OFF)
101 else()
102 set(_ENABLE_TESTS_DEFAULT ON)
103 endif()
104
cdf0626 @aristidb build: some plugins can now be enabled/disabled
aristidb authored
105 option(
106 ENABLE_TESTS
107 "Compile the test suite"
108 ${_ENABLE_TESTS_DEFAULT})
6e6c925 @aristidb build: build coverage-enabled flusspferd library for tests
aristidb authored
109
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
110 if(CMAKE_COMPILER_IS_GNUCXX)
111 option(ENABLE_DEBUG_WARNINGS "Enable -Wpadded and -Weffc++" OFF)
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
112
877bf9c @aristidb build: no -Wstrict-no-sentinel
aristidb authored
113 add_definitions("-pedantic-errors -Wall -Wextra"
55c6fee @aristidb build: less warnings
aristidb authored
114 "-Winit-self -Woverloaded-virtual -Wnon-virtual-dtor -Wsign-promo"
115 "-Wstrict-aliasing=1")
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
116
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
117 if(ENABLE_DEBUG_WARNINGS)
118 add_definitions("-Wpadded -Weffc++")
119 endif()
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
120
91c94af @aristidb build: remove wrong-ish space in CMakeLists.txt
aristidb authored
121 add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED)
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
122
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
123 set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
124 set(CMAKE_CXX_FLAGS_DEBUG "-g")
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
125
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
126 add_definitions("-Wno-long-long -ansi")
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
127
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
128 set(CMAKE_REQUIRED_FLAGS "")
cb17e10 @aristidb build: check GCC version
aristidb authored
129
130 check_cxx_source_compiles(
c13a525 @ashb cmake: Reduce min GCC version to 4.0 (from 4.2)
ashb authored
131 "#if __GNUC__ < 4
cb17e10 @aristidb build: check GCC version
aristidb authored
132 #error \"GCC too old\"
133 #endif
134 int main() {}"
135 GCC_VERSION_OK)
136
137 if(NOT GCC_VERSION_OK)
138 message(FATAL_ERROR "GCC Version too old! Get a newer GCC.")
139 endif()
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
140 elseif(MSVC)
141 add_definitions("/W3 /wd4512 /wd4355 /wd4800 /wd4996 /wd4714 /EHa")
142 set(WINLIBS projects/windows/lib32)
143 set(WININCLUDES ${CMAKE_SOURCE_DIR}/${WINLIBS})
144 endif()
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
145
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
146 include_directories(${Flusspferd_SOURCE_DIR}/include)
6f5a0f4 @aristidb build: add section for compiler options
aristidb authored
147
cdf0626 @aristidb build: some plugins can now be enabled/disabled
aristidb authored
148 ## Plugin options ###########################################################
149
150 option(
151 FORCE_PLUGINS
152 "Fail configuration if some enabled plugins could not be configured"
153 OFF)
154 option(PLUGIN_SQLITE3 "Build SQLite3 plugin" ON)
155 option(PLUGIN_GMP "Build GMP plugin" ON)
20f9427 @aristidb build: add LINE_EDITOR / FORCE_LINE_EDITOR options
aristidb authored
156 set(
157 LINE_EDITOR
158 "libedit"
159 CACHE
160 STRING
161 "Select the line editor (none, libedit, readline)"
162 )
163 option(
164 FORCE_LINE_EDITOR
165 "Fail configuration if the specified line editor is not available"
166 OFF)
0db0281 @ruediger build: create and install documentation
ruediger authored
167 option(CREATE_DOCUMENTATION "Create Documentation for Flusspferd" OFF)
20f9427 @aristidb build: add LINE_EDITOR / FORCE_LINE_EDITOR options
aristidb authored
168
357d9fb @ruediger build: removed ugliness introduced by last fix
ruediger authored
169 if(NOT LINE_EDITOR STREQUAL "none" AND
170 NOT LINE_EDITOR STREQUAL "libedit" AND
171 NOT LINE_EDITOR STREQUAL "readline")
172 message(FATAL_ERROR "Invalid option given for LINE_EDTIOR: ${LINE_EDITOR}")
20f9427 @aristidb build: add LINE_EDITOR / FORCE_LINE_EDITOR options
aristidb authored
173 endif()
cdf0626 @aristidb build: some plugins can now be enabled/disabled
aristidb authored
174
a89feb7 @aristidb build: actually use POSIX check for some things
aristidb authored
175 ## POSIX ####################################################################
176
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
177 check_cxx_source_runs(
a89feb7 @aristidb build: actually use POSIX check for some things
aristidb authored
178 "#include <unistd.h>
179 #include <cstdlib>
180 int main()
181 {
e783ed3 @aristidb build: allow slightly older version of POSIX
aristidb authored
182 return _POSIX_VERSION >= 199506
a89feb7 @aristidb build: actually use POSIX check for some things
aristidb authored
183 ? EXIT_SUCCESS
184 : EXIT_FAILURE;
185 }"
186 FLUSSPFERD_HAVE_POSIX)
187
a705460 build: check for /proc/self/exe
Aristid Breitkreuz authored
188 ## /proc/self/exe ###########################################################
189
190 if(RELOCATABLE)
a7c1697 @ashb build: various platform specific checks for getting hold of exe name
ashb authored
191 include(FindSelfExe)
a705460 build: check for /proc/self/exe
Aristid Breitkreuz authored
192 endif()
193
7541210 @aristidb build: longer divider comment lines
aristidb authored
194 ## libdl ####################################################################
467e215 @aristidb build: find libedit
aristidb authored
195
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
196 if(FLUSSPFERD_HAVE_POSIX)
197 find_package(DL REQUIRED)
0c164d6 @ashb core/file-0: Posix only implementation of get file owner
ashb authored
198 add_definitions(-DFLUSSPFERD_HAVE_POSIX)
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
199 include_directories(${DL_INCLUDE_DIR})
200 endif()
467e215 @aristidb build: find libedit
aristidb authored
201
fb7ba40 @ashb Find and link libiconv
ashb authored
202 ## iconv ####################################################################
203
2564c8e @aristidb build: as it happens, not all filesystems are case-insensitive
aristidb authored
204 find_package(Iconv REQUIRED)
fb7ba40 @ashb Find and link libiconv
ashb authored
205
ad2ae52 @aristidb build/encodings: fixed check for iconv, also check if iconv accepts c…
aristidb authored
206 if(ICONV_ACCEPTS_NONCONST_INPUT)
207 add_definitions(-DICONV_ACCEPTS_NONCONST_INPUT)
208 endif()
209
7541210 @aristidb build: longer divider comment lines
aristidb authored
210 ## Boost ####################################################################
f2ba500 @aristidb build: check for POSIX
aristidb authored
211
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
212 set(Boost_USE_MULTITHREADED ON)
720d7ff @aristidb build: use FindBoost module of cmake 2.6
aristidb authored
213
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
214 if(WIN32)
215 set(Boost_USE_STATIC_LIBS ON)
216 endif()
217
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
218 set(Boost_FIND_REQUIRED TRUE)
672dc53 @aristidb build: enable Boost_FIND_REQUIRED
aristidb authored
219
51d8076 @aristidb build: don't search for unit_test_framework if not needed
aristidb authored
220 set(FLUSSPFERD_BOOST_LIBRARIES thread filesystem system)
221
222 if(ENABLE_TESTS)
223 set(FLUSSPFERD_BOOST_LIBRARIES
224 unit_test_framework ${FLUSSPFERD_BOOST_LIBRARIES})
225 endif()
226
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
227 find_package(Boost 1.36.0 COMPONENTS
51d8076 @aristidb build: don't search for unit_test_framework if not needed
aristidb authored
228 ${FLUSSPFERD_BOOST_LIBRARIES})
1155c22 @aristidb build: search for boost
aristidb authored
229
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
230 if(Boost_INCLUDE_DIR)
231 include_directories(${Boost_INCLUDE_DIR})
232 else()
233 message(FATAL_ERROR "Boost headers not found. You will have to specify them in your build environment or you can use -DBOOST_ROOT or -DBOOST_INCLUDE_DIR to tell cmake where your boost installation is.")
234 endif()
35ab338 @aristidb build: check for Boost include directories and libraries, with fatal …
aristidb authored
235
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
236 if(Boost_LIBRARY_DIRS)
237 link_directories(${Boost_LIBRARY_DIRS})
238 else()
239 message(FATAL_ERROR "Boost libraries not found. Please set -DBOOST_ROOT or -DBOOST_LIBRARY_DIR manually.")
240 endif()
f858932 @aristidb build: check Boost include directory
aristidb authored
241
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
242 if(NOT Boost_FOUND)
243 message(STATUS "Boost not found!")
244 endif()
f2ba500 @aristidb build: check for POSIX
aristidb authored
245
7541210 @aristidb build: longer divider comment lines
aristidb authored
246 ## Spidermonkey #############################################################
2b6333a @aristidb build: compile libflusspferd
aristidb authored
247
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
248 set(Spidermonkey_REQUIRED TRUE)
249 find_package(Spidermonkey)
b85e598 @aristidb build: add variable for spidermonkey include directory
aristidb authored
250
991b740 @aristidb build: fix potentially misleading error messages
aristidb authored
251 if(NOT SPIDERMONKEY_FOUND)
252 message(FATAL_ERROR "Spidermonkey not found")
253 endif()
254
255 if(SPIDERMONKEY_FOUND AND NOT SPIDERMONKEY_UTF8)
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
256 message(FATAL_ERROR "Spidermonkey UTF8 support required but not found")
257 endif()
72101ab @aristidb build: check spidermonkey for UTF8 support
aristidb authored
258
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
259 include_directories(${SPIDERMONKEY_INCLUDE_DIR})
260 add_definitions(${SPIDERMONKEY_DEFINITIONS})
cc021ac @aristidb build: check spidermonkey for JS_THREADSAFE
aristidb authored
261
7541210 @aristidb build: longer divider comment lines
aristidb authored
262 ## libedit ##################################################################
467e215 @aristidb build: find libedit
aristidb authored
263
20f9427 @aristidb build: add LINE_EDITOR / FORCE_LINE_EDITOR options
aristidb authored
264 if(LINE_EDITOR STREQUAL "libedit")
1a5a824 @ruediger shell: added GNU/readline support
ruediger authored
265 find_package(Libedit)
467e215 @aristidb build: find libedit
aristidb authored
266
1a5a824 @ruediger shell: added GNU/readline support
ruediger authored
267 if(LIBEDIT_FOUND)
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
268 add_definitions(-DHAVE_EDITLINE)
269 include_directories(${LIBEDIT_INCLUDE_DIR})
1a5a824 @ruediger shell: added GNU/readline support
ruediger authored
270 endif()
20f9427 @aristidb build: add LINE_EDITOR / FORCE_LINE_EDITOR options
aristidb authored
271
272 if(FORCE_LINE_EDITOR AND NOT LIBEDIT_FOUND)
273 message(SEND_ERROR "libedit required but it was not found")
274 endif()
1a5a824 @ruediger shell: added GNU/readline support
ruediger authored
275 endif()
276
277 ## GNU/readline #############################################################
278
20f9427 @aristidb build: add LINE_EDITOR / FORCE_LINE_EDITOR options
aristidb authored
279 if(LINE_EDITOR STREQUAL "readline")
ef74838 @ruediger added warning message if GNU/Readline is linked and added GNU/Readlin…
ruediger authored
280 message("WARNING: GNU/readline is GPL licensed.")
281
1a5a824 @ruediger shell: added GNU/readline support
ruediger authored
282 find_package(Readline)
283
284 if(READLINE_FOUND)
285 add_definitions(-DHAVE_READLINE)
286 include_directories(${READLINE_INCLUDE_DIR})
287 endif()
20f9427 @aristidb build: add LINE_EDITOR / FORCE_LINE_EDITOR options
aristidb authored
288
289 if(FORCE_LINE_EDITOR AND NOT READLINE_FOUND)
290 message(SEND_ERROR "readline required but it was not found")
291 endif()
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
292 endif()
467e215 @aristidb build: find libedit
aristidb authored
293
77ed9ea @aristidb build: add sqlite3 plugin
aristidb authored
294 ## sqlite3 ##################################################################
295
cdf0626 @aristidb build: some plugins can now be enabled/disabled
aristidb authored
296 if(PLUGIN_SQLITE3)
297 pkg_check_modules(SQLITE3 sqlite3>=3.4.0)
298 include_directories(${SQLITE3_INCLUDE_DIRS})
299 link_directories(${SQLITE3_LIBRARY_DIRS})
300
301 if(FORCE_PLUGINS AND NOT SQLITE3_FOUND)
302 message(SEND_ERROR "SQLite3 plugin required but SQLite3 not found")
303 endif()
304 endif()
77ed9ea @aristidb build: add sqlite3 plugin
aristidb authored
305
f626e4d @aristidb build: add gmp plugin
aristidb authored
306 ## GMP ######################################################################
307
cdf0626 @aristidb build: some plugins can now be enabled/disabled
aristidb authored
308 if(PLUGIN_GMP)
309 find_package(GMP)
310 find_package(GMPXX)
311
312 if(FORCE_PLUGINS)
313 if(NOT GMP_FOUND OR NOT GMPXX_FOUND)
314 message(SEND_ERROR "GMP plugin required but GMP/GMPXX not found")
315 endif()
316 endif()
317 endif()
f626e4d @aristidb build: add gmp plugin
aristidb authored
318
7541210 @aristidb build: longer divider comment lines
aristidb authored
319 ## Library ##################################################################
2b6333a @aristidb build: compile libflusspferd
aristidb authored
320
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
321 file(
2b6333a @aristidb build: compile libflusspferd
aristidb authored
322 GLOB
323 flusspferd_library_sources
116677c @aristidb core: move many sources to src/core/ because they are not Spidermonke…
aristidb authored
324 ${Flusspferd_SOURCE_DIR}/src/core/*.cpp
bf556b5 @aristidb io: make IO a core module
aristidb authored
325 ${Flusspferd_SOURCE_DIR}/src/spidermonkey/*.cpp
8a7e071 @ruediger build: add header files to the project
ruediger authored
326 ${Flusspferd_SOURCE_DIR}/src/io/*.cpp
327 ${Flusspferd_SOURCE_DIR}/include/*.hpp
90d2345 @ruediger build: add more header files
ruediger authored
328 ${Flusspferd_SOURCE_DIR}/include/flusspferd/*.hpp
329 ${Flusspferd_SOURCE_DIR}/include/flusspferd/io/*.hpp
330 ${Flusspferd_SOURCE_DIR}/include/flusspferd/detail/*.hpp
331 ${Flusspferd_SOURCE_DIR}/include/flusspferd/spidermonkey/*.hpp)
2b6333a @aristidb build: compile libflusspferd
aristidb authored
332
3ee8c4d Build flusspferd as a static lib for Windows
unknown authored
333 if(WIN32)
334 set(FLUSSPFERD_LIBRARY_TYPE STATIC)
335 else()
336 set(FLUSSPFERD_LIBRARY_TYPE SHARED)
337 endif()
338
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
339 add_library(
2b6333a @aristidb build: compile libflusspferd
aristidb authored
340 flusspferd
3ee8c4d Build flusspferd as a static lib for Windows
unknown authored
341 ${FLUSSPFERD_LIBRARY_TYPE}
2b6333a @aristidb build: compile libflusspferd
aristidb authored
342 ${flusspferd_library_sources})
28a56c9 @aristidb build: add shell executable
aristidb authored
343
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
344 set(
6e6c925 @aristidb build: build coverage-enabled flusspferd library for tests
aristidb authored
345 flusspferd_LIBS
872fed4 @aristidb build: add FindDL.cmake
aristidb authored
346 ${DL_LIBRARIES}
fb7ba40 @ashb Find and link libiconv
ashb authored
347 ${ICONV_LIBRARIES}
4af245f @aristidb build: move Spidermonkey search into FindSpidermonkey.cmake module
aristidb authored
348 ${SPIDERMONKEY_LIBRARIES}
720d7ff @aristidb build: use FindBoost module of cmake 2.6
aristidb authored
349 ${Boost_THREAD_LIBRARY}
350 ${Boost_FILESYSTEM_LIBRARY}
351 ${Boost_SYSTEM_LIBRARY})
13c4451 @aristidb build: find and link spidermonkey
aristidb authored
352
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
353 target_link_libraries(flusspferd ${flusspferd_LIBS})
6e6c925 @aristidb build: build coverage-enabled flusspferd library for tests
aristidb authored
354
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
355 if(NOT WIN32)
356 install(TARGETS
357 flusspferd
358 LIBRARY DESTINATION ${INSTALL_LIBRARIES_PATH})
359 endif()
80fc705 @aristidb build: improve installation procedure for libflusspferd and flusspfer…
aristidb authored
360
6e6c925 @aristidb build: build coverage-enabled flusspferd library for tests
aristidb authored
361 ## Library - coverage variant ###############################################
362
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
363 if(ENABLE_TESTS)
6e6c925 @aristidb build: build coverage-enabled flusspferd library for tests
aristidb authored
364
60aff17 @aristidb test: donot use coverage testing for now, because it only created pro…
aristidb authored
365 # The coverage library has been removed for now. It only makes it less likely
366 # for people to run the tests, which is a bigger problem than getting coverage
367 # numbers, which don't work for JS anyways.
368
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
369 # file(
1bdc8ea @aristidb build: compile tests
aristidb authored
370 # GLOB
371 # flusspferd_coverage_extra_sources
372 # ${Flusspferd_SOURCE_DIR}/src/io/*.cpp
373 # ${Flusspferd_SOURCE_DIR}/src/xml/*.cpp)
60aff17 @aristidb test: donot use coverage testing for now, because it only created pro…
aristidb authored
374 #
375 # add_library(
376 # flusspferd-coverage
377 # SHARED
378 # ${flusspferd_library_sources} ${flusspferd_coverage_extra_sources})
379 #
380 # target_link_libraries(flusspferd-coverage ${flusspferd_LIBS})
381 #
382 # set(COV_FLAGS "-fprofile-arcs -ftest-coverage")
383 #
384 # set_property(
385 # TARGET flusspferd-coverage
386 # PROPERTY COMPILE_FLAGS
387 # "${COV_FLAGS} -DFLUSSPFERD_COVERAGE")
388 #
389 # set_property(
390 # TARGET flusspferd-coverage
391 # PROPERTY LINK_FLAGS
392 # ${COV_FLAGS})
6e6c925 @aristidb build: build coverage-enabled flusspferd library for tests
aristidb authored
393
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
394 endif()
6e6c925 @aristidb build: build coverage-enabled flusspferd library for tests
aristidb authored
395
7541210 @aristidb build: longer divider comment lines
aristidb authored
396 ## Programs #################################################################
28a56c9 @aristidb build: add shell executable
aristidb authored
397
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
398 add_executable(
28a56c9 @aristidb build: add shell executable
aristidb authored
399 flusspferd-shell
400 src/programs/flusspferd.cpp)
401
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
402 set_property(
5135631 @aristidb build: rename flusspferd executable flusspferd, no longer flusspferd-…
aristidb authored
403 TARGET flusspferd-shell
404 PROPERTY OUTPUT_NAME
405 flusspferd)
406
fd02ccf @aristidb build: syntax problems
aristidb authored
407 if(NOT LINE_EDITOR STREQUAL "readline")
1a5a824 @ruediger shell: added GNU/readline support
ruediger authored
408 target_link_libraries(
28a56c9 @aristidb build: add shell executable
aristidb authored
409 flusspferd-shell
467e215 @aristidb build: find libedit
aristidb authored
410 flusspferd
411 ${LIBEDIT_LIBRARIES})
1a5a824 @ruediger shell: added GNU/readline support
ruediger authored
412 else()
413 target_link_libraries(
414 flusspferd-shell
415 flusspferd
416 ${READLINE_LIBRARIES})
417 endif()
7a357e1 @aristidb build: add flusspferd-io lib
aristidb authored
418
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
419 if(NOT WIN32)
420 install(TARGETS
421 flusspferd-shell
422 RUNTIME DESTINATION ${INSTALL_EXECUTABLES_PATH})
423 endif()
80fc705 @aristidb build: improve installation procedure for libflusspferd and flusspfer…
aristidb authored
424
1bdc8ea @aristidb build: compile tests
aristidb authored
425 ## Tests ###################################################################
426
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
427 if(ENABLE_TESTS)
1bdc8ea @aristidb build: compile tests
aristidb authored
428
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
429 file(GLOB
1bdc8ea @aristidb build: compile tests
aristidb authored
430 TESTS
90d2345 @ruediger build: add more header files
ruediger authored
431 test/test_*.cpp
432 #test/*.hpp
433 )
1bdc8ea @aristidb build: compile tests
aristidb authored
434
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
435 foreach(TEST_SOURCE ${TESTS})
436 string(REGEX MATCH "test_[a-zA-Z0-9_]*" TEST_OUTPUT ${TEST_SOURCE})
437 string(REGEX REPLACE "^test_" "" TEST_NAME TEST_OUTPUT)
438 add_executable(${TEST_OUTPUT} ${TEST_SOURCE})
439 set_property(
1bdc8ea @aristidb build: compile tests
aristidb authored
440 TARGET ${TEST_OUTPUT}
441 PROPERTY COMPILE_FLAGS
442 "-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MODULE=${TEST_NAME}")
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
443 target_link_libraries(
1bdc8ea @aristidb build: compile tests
aristidb authored
444 ${TEST_OUTPUT}
445 ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
60aff17 @aristidb test: donot use coverage testing for now, because it only created pro…
aristidb authored
446 flusspferd)
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
447 endforeach()
1bdc8ea @aristidb build: compile tests
aristidb authored
448
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
449 endif()
1bdc8ea @aristidb build: compile tests
aristidb authored
450
23315c0 @aristidb build: build os plugin
aristidb authored
451 ## Plugins #################################################################
452
cdf0626 @aristidb build: some plugins can now be enabled/disabled
aristidb authored
453 if(PLUGIN_SQLITE3 AND SQLITE3_FOUND)
4ec54ec @aristidb Lower-case module names
aristidb authored
454 set(PLUGINS ${PLUGINS} sqlite3)
455 set(sqlite3_DEFINITIONS ${SQLITE3_DEFINITIONS})
456 set(sqlite3_LIBRARIES ${SQLITE3_LIBRARIES})
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
457 endif()
c3cc279 @aristidb build: add curl plugin (but compiled with wrong name)
aristidb authored
458
cdf0626 @aristidb build: some plugins can now be enabled/disabled
aristidb authored
459 if(PLUGIN_GMP AND GMP_FOUND AND GMPXX_FOUND)
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
460 set(PLUGINS ${PLUGINS} gmp)
461 set(gmp_LIBRARIES ${GMPXX_LIBRARY} ${GMP_LIBRARY})
14b582c @aristidb build: setting the property INCLUDE_DIRECTORIES does not work
aristidb authored
462 include_directories(${GMP_INCLUDE_DIR})
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
463 endif()
f626e4d @aristidb build: add gmp plugin
aristidb authored
464
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
465 foreach(PLUGIN ${PLUGINS})
a0bdfd5 @aristidb build: more success messages (to avoid confusion if there are non-fat…
aristidb authored
466 message(STATUS "Plugin: ${PLUGIN} (will be built)")
23315c0 @aristidb build: build os plugin
aristidb authored
467
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
468 file(GLOB
856c1e5 @aristidb build: indentation
aristidb authored
469 ${PLUGIN}_sources
90d2345 @ruediger build: add more header files
ruediger authored
470 ${Flusspferd_SOURCE_DIR}/src/plugins/${PLUGIN}/*.cpp
471 ${Flusspferd_SOURCE_DIR}/src/plugins/${PLUGIN}/*.hpp)
856c1e5 @aristidb build: indentation
aristidb authored
472
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
473 add_library(${PLUGIN}_PLUGIN MODULE ${${PLUGIN}_sources})
856c1e5 @aristidb build: indentation
aristidb authored
474
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
475 set_property(
856c1e5 @aristidb build: indentation
aristidb authored
476 TARGET ${PLUGIN}_PLUGIN
477 PROPERTY OUTPUT_NAME
478 ${PLUGIN})
479
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
480 set_property(
856c1e5 @aristidb build: indentation
aristidb authored
481 TARGET ${PLUGIN}_PLUGIN
482 PROPERTY LIBRARY_OUTPUT_DIRECTORY
483 ${Flusspferd_BINARY_DIR}/modules)
484
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
485 set_property(
856c1e5 @aristidb build: indentation
aristidb authored
486 TARGET ${PLUGIN}_PLUGIN
487 PROPERTY DEFINITIONS
488 ${${PLUGIN}_DEFINITIONS})
489
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
490 target_link_libraries(
856c1e5 @aristidb build: indentation
aristidb authored
491 ${PLUGIN}_PLUGIN
492 flusspferd
493 ${${PLUGIN}_LIBRARIES})
e7bb539 @aristidb build: build plugins with a loop and into the modules/ directory
aristidb authored
494
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
495 if(NOT WIN32)
496 install(TARGETS
497 ${PLUGIN}_PLUGIN
498 LIBRARY DESTINATION ${INSTALL_MODULES_PATH})
864fc1a @aristidb build: install IO, XML and plugins
aristidb authored
499
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
500 file(GLOB
501 ${PLUGIN}_JS_FILES
502 ${Flusspferd_SOURCE_DIR}/src/plugins/${PLUGIN}/${PLUGIN}.js)
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
503
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
504 if(${PLUGIN}_JS_FILES)
505 install(FILES
506 ${${PLUGIN}_JS_FILES}
507 DESTINATION ${INSTALL_MODULES_PATH})
508 endif()
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
509 endif()
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
510
4cf0661 @aristidb build: use lower-case cmake function names
aristidb authored
511 endforeach()
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
512
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
513 if(NOT WIN32)
514 set(JS_PLUGINS
4a0c78b @ashb cmake: Install test harness modules
ashb authored
515 util util/array util/function util/range test test/equiv http/headers)
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
516
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
517 foreach(JS_PLUGIN ${JS_PLUGINS})
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
518
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
519 string(REGEX MATCH ".*/" ${JS_PLUGIN}_DIR ${JS_PLUGIN})
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
520
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
521 install(FILES
522 src/js/${JS_PLUGIN}.js
523 DESTINATION ${INSTALL_MODULES_PATH}/${${JS_PLUGIN}_DIR})
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
524
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
525 endforeach()
526 endif()
5c221d9 @aristidb build: install headers
aristidb authored
527
528 ## Headers ##################################################################
529
90d2345 @ruediger build: add more header files
ruediger authored
530 file(GLOB_RECURSE HEADERFILES *.hpp)
531
532 foreach(HEADER ${HEADERFILES})
533 set_source_files_properties(${HEADER}
534 PROPERTIES
535 HEADER_FILE_ONLY TRUE)
536 endforeach()
537
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
538 if(NOT WIN32)
539 install(
540 DIRECTORY include/
541 DESTINATION ${INSTALL_HEADERS_PATH}
542 FILES_MATCHING PATTERN "*.hpp")
543 endif()
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
544
545 ## Prelude ##################################################################
546
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
547 if(NOT WIN32)
548 install(
549 FILES src/js/prelude.js
550 DESTINATION ${INSTALL_LIBDATA_PATH})
551 endif()
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
552
0db0281 @ruediger build: create and install documentation
ruediger authored
553 ## Documentation ############################################################
554
555 if(NOT WIN32)
556 if(CREATE_DOCUMENTATION)
557 message(STATUS "WILL create and install documentation")
558 add_custom_target(DOCS ALL
559 COMMAND ${Flusspferd_SOURCE_DIR}/util/docs.sh
560 WORKING_DIRECTORY ${Flusspferd_SOURCE_DIR})
561 install(
562 DIRECTORY ${Flusspferd_BINARY_DIR}/html/
cb38aa1 @ruediger build: install documentation in PREFIX/share/doc/flusspferd
ruediger authored
563 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/flusspferd/)
0db0281 @ruediger build: create and install documentation
ruediger authored
564 endif()
565 endif()
566
0dbe02a @aristidb build: generate flusspferd.pc again
aristidb authored
567 ## Configured files##########################################################
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
568
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
569 if(NOT WIN32)
570 configure_file(
571 ${Flusspferd_SOURCE_DIR}/src/js/jsrepl.js.in
572 ${Flusspferd_BINARY_DIR}/js/jsrepl.js)
0312cd8 @aristidb build: install so much that the installed flusspferd binary works
aristidb authored
573
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
574 install(
575 FILES ${Flusspferd_BINARY_DIR}/js/jsrepl.js
576 DESTINATION ${INSTALL_ETC_PATH}/flusspferd)
0dbe02a @aristidb build: generate flusspferd.pc again
aristidb authored
577
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
578 set(FLUSSPFERD_EXTERNAL_CFLAGS
579 "-I${Boost_INCLUDE_DIR} -I${SPIDERMONKEY_INCLUDE_DIR}")
2b6a1b8 @aristidb fix flusspferd.pc
aristidb authored
580
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
581 foreach(_FLAG @SPIDERMONKEY_DEFINITIONS@)
582 set(FLUSSPFERD_EXTERNAL_CFLAGS "${FLUSSPFERD_EXTERNAL_CFLAGS} ${_FLAG}")
583 endforeach()
8996ed6 @aristidb build: add spidermonkey flags to flusspferd.pc
aristidb authored
584
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
585 configure_file(
586 ${Flusspferd_SOURCE_DIR}/flusspferd.pc.in
587 ${Flusspferd_BINARY_DIR}/flusspferd.pc
588 @ONLY)
0dbe02a @aristidb build: generate flusspferd.pc again
aristidb authored
589
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
590 install(
591 FILES ${Flusspferd_BINARY_DIR}/flusspferd.pc
592 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
6427216 @ruediger build: install manpage
ruediger authored
593
433a48d @ruediger build: compress manpage and install compressed manpage
ruediger authored
594 add_custom_command(
cc11618 @ruediger build: Generates manpage from flusspferd --hidden-man
ruediger authored
595 OUTPUT flusspferd.1
297e094 @ruediger build: use /dev/null as config during build
ruediger authored
596 COMMAND ${Flusspferd_BINARY_DIR}/bin/flusspferd -c /dev/null --hidden-man > ${Flusspferd_BINARY_DIR}/flusspferd.1.options
597 COMMAND ${Flusspferd_BINARY_DIR}/bin/flusspferd -c /dev/null -- ${Flusspferd_SOURCE_DIR}/util/replace-var.js --file-var OPTIONS=${Flusspferd_BINARY_DIR}/flusspferd.1.options ${Flusspferd_SOURCE_DIR}/help/flusspferd.1.in > ${Flusspferd_BINARY_DIR}/flusspferd.1
cc11618 @ruediger build: Generates manpage from flusspferd --hidden-man
ruediger authored
598 DEPENDS ${Flusspferd_SOURCE_DIR}/help/flusspferd.1.in
599 DEPENDS flusspferd-shell
600 COMMENT "Generating manpage")
601 add_custom_command(
433a48d @ruediger build: compress manpage and install compressed manpage
ruediger authored
602 OUTPUT flusspferd.1.gz
cc11618 @ruediger build: Generates manpage from flusspferd --hidden-man
ruediger authored
603 COMMAND gzip -9 -c ${Flusspferd_BINARY_DIR}/flusspferd.1 > ${Flusspferd_BINARY_DIR}/flusspferd.1.gz
604 DEPENDS flusspferd.1
433a48d @ruediger build: compress manpage and install compressed manpage
ruediger authored
605 COMMENT "Compressing manpage")
606 add_custom_target(
351e963 @ruediger build: readded the ALL option
ruediger authored
607 MANPAGE ALL
433a48d @ruediger build: compress manpage and install compressed manpage
ruediger authored
608 DEPENDS flusspferd.1.gz)
6427216 @ruediger build: install manpage
ruediger authored
609 install(
433a48d @ruediger build: compress manpage and install compressed manpage
ruediger authored
610 FILES ${Flusspferd_BINARY_DIR}/flusspferd.1.gz
27bb56d @ruediger build: install manpage into PREFIX/share/man/ and not PREFIX/man!
ruediger authored
611 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
433a48d @ruediger build: compress manpage and install compressed manpage
ruediger authored
612
2122f9e @ruediger bash_completion.sh is now auto generated
ruediger authored
613 add_custom_command(
614 OUTPUT bash_completion.sh
297e094 @ruediger build: use /dev/null as config during build
ruediger authored
615 COMMAND ${Flusspferd_BINARY_DIR}/bin/flusspferd -c /dev/null --hidden-bash > ${Flusspferd_BINARY_DIR}/bash_completion.impl
616 COMMAND ${Flusspferd_BINARY_DIR}/bin/flusspferd -c /dev/null -- ${Flusspferd_SOURCE_DIR}/util/replace-var.js --file-var IMPL=${Flusspferd_BINARY_DIR}/bash_completion.impl ${Flusspferd_SOURCE_DIR}/misc/bash_completion.sh.in > ${Flusspferd_BINARY_DIR}/bash_completion.sh
2122f9e @ruediger bash_completion.sh is now auto generated
ruediger authored
617 DEPENDS flusspferd-shell
618 COMMENT "Generating Bash Completion Script")
619 add_custom_target(
620 BASH_COMPLETION ALL
621 DEPENDS bash_completion.sh)
b8148bc @ruediger build: install bash_completion.sh into PREFIX/etc/bash_completion.d/
ruediger authored
622 install(
623 FILES ${Flusspferd_BINARY_DIR}/bash_completion.sh
624 DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/bash_completion.d
625 RENAME flusspferd)
8748ab0 @ruediger build: emacs mode is installed again *grml*
ruediger authored
626
5dd5e45 @ruediger build: byte compile emacs mode
ruediger authored
627 find_program(EMACS NAMES emacs)
fa60200 @aristidb build: fix check for emacs presence
aristidb authored
628 if(NOT EMACS STREQUAL "EMACS-NOTFOUND")
629 message(STATUS "WILL install Emacs mode")
5dd5e45 @ruediger build: byte compile emacs mode
ruediger authored
630 add_custom_command(
631 OUTPUT flusspferd.elc
632 COMMAND emacs -batch -q -f batch-byte-compile ${Flusspferd_SOURCE_DIR}/misc/emacs/flusspferd.el
633 COMMAND mv ${Flusspferd_SOURCE_DIR}/misc/emacs/flusspferd.elc ${Flusspferd_BINARY_DIR}/
634 DEPENDS ${Flusspferd_SOURCE_DIR}/misc/emacs/flusspferd.el
635 COMMENT "Byte compiling Emacs code")
636 add_custom_target(
351e963 @ruediger build: readded the ALL option
ruediger authored
637 EMACS_MODE ALL
5dd5e45 @ruediger build: byte compile emacs mode
ruediger authored
638 DEPENDS flusspferd.elc)
639 install(
640 FILES ${Flusspferd_BINARY_DIR}/flusspferd.elc
8748ab0 @ruediger build: emacs mode is installed again *grml*
ruediger authored
641 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emacs/site-lisp)
5dd5e45 @ruediger build: byte compile emacs mode
ruediger authored
642 endif()
643
644 # install emacs mode source even if emacs is not found
645 install(
646 FILES ${Flusspferd_SOURCE_DIR}/misc/emacs/flusspferd.el
647 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emacs/site-lisp)
0026e1f @aristidb win32/build: I can get cmake to configure now!
aristidb authored
648 endif()
a0bdfd5 @aristidb build: more success messages (to avoid confusion if there are non-fat…
aristidb authored
649
650 message(STATUS "Configuration SUCCESSFUL. No fatal errors.")
Something went wrong with that request. Please try again.