~marcustomlinson/unity-js-scopes/support-new-sdk

1 by Alexandre Abreu
draft
1
# vim:expandtab:shiftwidth=2:tabstop=2:
2
3
# Copyright (C) 2015 Canonical Ltd.
4
5
# This library is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU Lesser General Public
7
# License as published by the Free Software Foundation; either
8
# version 2.1 of the License, or (at your option) any later version.
9
10
# This library is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
# Lesser General Public License for more details.
14
15
# You should have received a copy of the GNU Lesser General Public
16
# License along with this library; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
19
cmake_minimum_required(VERSION 2.8.11)
20
21
project(js-scopes)
22
23
include(CheckCXXCompilerFlag)
24
include(CheckIncludeFileCXX)
25
76 by Alexandre Abreu
Fix unknown cmake gnu install dirs
26
# Standard install paths
27
include(GNUInstallDirs)
28
1 by Alexandre Abreu
draft
29
set(CMAKE_INCLUDE_CURRENT_DIR TRUE CACHE INTERNAL "")
30
2 by Alexandre Abreu
Tweak cmake files
31
message(STATUS "Retrieving deps")
32
33
execute_process(
34
  COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/deps/get.sh
35
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
36
  RESULT_VARIABLE _DEPS_RESULT
37
  )
38
39
if(NOT _DEPS_RESULT EQUAL 0)
40
  message(FATAL_ERROR "Retriving deps failed")
41
endif()
42
1 by Alexandre Abreu
draft
43
include_directories(
55 by Marcus Tomlinson
Replaced sync-request with http in js-scope.webapps_js-scope.js
44
  ${CMAKE_CURRENT_SOURCE_DIR}/deps/io.js/deps/uv/include
9.1.1 by Marcus Tomlinson
* Add .bzrignore.
45
  ${CMAKE_CURRENT_SOURCE_DIR}/deps/io.js/deps/v8/include
46
  ${CMAKE_CURRENT_SOURCE_DIR}/deps/io.js/src
2 by Alexandre Abreu
Tweak cmake files
47
  ${CMAKE_CURRENT_SOURCE_DIR}/deps/v8-cpp/src
1 by Alexandre Abreu
draft
48
  ${CMAKE_CURRENT_SOURCE_DIR}/src
49
  )
50
19 by Marcus Tomlinson
Link debug io.js build when building unity-js-scopes in debug
51
string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
52
if(cmake_build_type_tolower STREQUAL "debug")
53
  link_directories(
54
    ${CMAKE_CURRENT_SOURCE_DIR}/deps/io.js/out/Debug
55
  )
56
else()
57
  link_directories(
58
    ${CMAKE_CURRENT_SOURCE_DIR}/deps/io.js/out/Release
59
  )
60
endif()
1 by Alexandre Abreu
draft
61
62
add_subdirectory(src)
82.4.1 by Alexandre Abreu
Doc draft
63
add_subdirectory(doc)
75 by Alexandre Abreu
Add examples package; tweak readme
64
85.1.6 by Alexandre Abreu
tweak example package
65
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/examples
75 by Alexandre Abreu
Add examples package; tweak readme
66
        DESTINATION ${CMAKE_INSTALL_DATADIR}/unity-js-scopes)
82.4.1 by Alexandre Abreu
Doc draft
67
86.2.3 by Marcus Tomlinson
Bit of cleanup
68
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/qtc-templates/scope-js
86.2.2 by Marcus Tomlinson
Added qtc-templates
69
        DESTINATION /usr/share/qtcreator/templates/wizards/ubuntu)