|
| 1 | +# |
| 2 | +# Copyright (C) 2013 KO GmbH <copyright@kogmbh.com> |
| 3 | +# |
| 4 | +# @licstart |
| 5 | +# This program is free software: you can redistribute it |
| 6 | +# and/or modify it under the terms of the GNU Affero General Public License |
| 7 | +# (GNU AGPL) as published by the Free Software Foundation, either version 3 of |
| 8 | +# the License, or (at your option) any later version. The code is distributed |
| 9 | +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 10 | +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details. |
| 11 | +# |
| 12 | +# As additional permission under GNU AGPL version 3 section 7, you |
| 13 | +# may distribute non-source (e.g., minimized or compacted) forms of |
| 14 | +# that code without the copy of the GNU GPL normally required by |
| 15 | +# section 4, provided you include this license notice and a URL |
| 16 | +# through which recipients can access the Corresponding Source. |
| 17 | +# |
| 18 | +# As a special exception to the AGPL, any HTML file which merely makes function |
| 19 | +# calls to this code, and for that purpose includes it by reference shall be |
| 20 | +# deemed a separate work for copyright law purposes. In addition, the copyright |
| 21 | +# holders of this code give you permission to combine this code with free |
| 22 | +# software libraries that are released under the GNU LGPL. You may copy and |
| 23 | +# distribute such a system following the terms of the GNU AGPL for this code |
| 24 | +# and the LGPL for the libraries. If you modify this code, you may extend this |
| 25 | +# exception to your version of the code, but you are not obligated to do so. |
| 26 | +# If you do not wish to do so, delete this exception statement from your |
| 27 | +# version. |
| 28 | +# |
| 29 | +# This license applies to this entire compilation. |
| 30 | +# @licend |
| 31 | +# @source: http://thz.github.com/Viewer.js/ |
| 32 | +# |
| 33 | + |
| 34 | +project (Viewer.js) |
| 35 | +# version 2.8.2 is needed to have support for zip files in external projects |
| 36 | +# issues with version 2.8.4 on Windows makes us test for a higher version |
| 37 | +cmake_minimum_required(VERSION 2.8.6) |
| 38 | + |
| 39 | +# At this point, the version number that is used throughout is defined |
| 40 | +set(VIEWERJS_VERSION 0.1.0) |
| 41 | + |
| 42 | +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
| 43 | + message(FATAL_ERROR "Compiling in the source directory is not supported. Use for example 'mkdir build; cd build; cmake ..'.") |
| 44 | +endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
| 45 | + |
| 46 | +# Tools must be obtained to work with: |
| 47 | +include (ExternalProject) |
| 48 | + |
| 49 | +# allow specification of a directory with pre-downloaded |
| 50 | +# requirements by evaluating environment variable |
| 51 | +# $VIEWERJS_DOWNLOAD_DIR |
| 52 | +# defaults to ./downloads in the build directory. |
| 53 | +if ( IS_DIRECTORY $ENV{VIEWERJS_DOWNLOAD_DIR} ) |
| 54 | + SET ( EXTERNALS_DOWNLOAD_DIR $ENV{VIEWERJS_DOWNLOAD_DIR} ) |
| 55 | +else ( IS_DIRECTORY $ENV{VIEWERJS_DOWNLOAD_DIR} ) |
| 56 | + SET ( EXTERNALS_DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/downloads ) |
| 57 | +endif ( IS_DIRECTORY $ENV{VIEWERJS_DOWNLOAD_DIR} ) |
| 58 | +MESSAGE ( STATUS "external downloads will be stored/expected in: ${EXTERNALS_DOWNLOAD_DIR}" ) |
| 59 | + |
| 60 | +ExternalProject_Add( |
| 61 | + WebODF |
| 62 | + GIT_REPOSITORY git@gitorious.org:webodf/webodf.git |
| 63 | + UPDATE_COMMAND "" |
| 64 | + INSTALL_COMMAND "" |
| 65 | + ALWAYS 0 |
| 66 | +) |
| 67 | + |
0 commit comments