Partially add building of Android application to CMake system. This is not straightfo...
[odfkit:webodf.git] / CMakeLists.txt
1 # WebODF is mostly a JavaScript project. CMake needs to know about the C++ parts
2 project (WebODF C CXX Java)
3 cmake_minimum_required(VERSION 2.8)
4
5 # This makefile 'compiles' WebODF using various tools, instruments the code and
6 # builds and packages programs that use WebODF.
7
8 # Find installed dependencies
9 find_package(Qt4 COMPONENTS QtWebKit QtXml)
10
11 # Tools must be obtained to work with:
12 include (ExternalProject)
13
14 # Closure Compiler
15 ExternalProject_Add(
16         ClosureCompiler
17         URL "http://closure-compiler.googlecode.com/files/compiler-20110119.tar.gz"
18         URL_MD5 1e88d14026e63051df2aa3a89c9efcf3
19         CONFIGURE_COMMAND ""
20         BUILD_COMMAND ""
21         INSTALL_COMMAND ""
22 )
23 set(CLOSURE_JAR ${CMAKE_BINARY_DIR}/ClosureCompiler-prefix/src/ClosureCompiler/compiler.jar)
24
25 # Rhino
26 ExternalProject_Add(
27         Rhino
28         URL "ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip"
29         URL_MD5 40d0a9abec8169e42920214b37fa8e0e
30         CONFIGURE_COMMAND ""
31         BUILD_COMMAND ""
32         INSTALL_COMMAND ""
33 )
34 set(RHINO ${CMAKE_BINARY_DIR}/Rhino-prefix/src/Rhino/js.jar)
35
36 # JSDoc
37 ExternalProject_Add(
38         JsDoc
39         URL "http://jsdoc-toolkit.googlecode.com/files/jsdoc_toolkit-2.3.2.zip"
40         URL_MD5 eed919de3bf2bb63f629c86ddf8e9651
41         CONFIGURE_COMMAND ""
42         BUILD_COMMAND ""
43         INSTALL_COMMAND ""
44 )
45 set(JSDOCDIR ${CMAKE_BINARY_DIR}/JsDoc-prefix/src/JsDoc/jsdoc-toolkit)
46
47 # Node.JS
48 ExternalProject_Add(
49         NodeJS
50         URL "http://nodejs.org/dist/node-v0.4.0.tar.gz"
51         URL_MD5 18f89256751f9b8e27dee8494f508171
52         INSTALL_COMMAND ""
53 )
54 set(NODE ${CMAKE_BINARY_DIR}/NodeJS-prefix/src/NodeJS-build/default/node)
55
56 # JSCoverage
57 ExternalProject_Add(
58         JSCoverage
59         URL "http://siliconforks.com/jscoverage/download/jscoverage-0.5.1.tar.bz2"
60         URL_MD5 a70d79a6759367fbcc0bcc18d6866ff3
61         CONFIGURE_COMMAND "./configure"
62         BUILD_IN_SOURCE 1
63         INSTALL_COMMAND ""
64 )
65 set(JSCOVERAGE ${CMAKE_BINARY_DIR}/JSCoverage-prefix/src/JSCoverage/jscoverage)
66
67 # Android
68 find_path(ANDROID_SDK_DIR platform-tools/aapt)
69
70 add_subdirectory(webodf)
71 add_subdirectory(programs)