-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (46 loc) · 1.71 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
project(wattpad)
cmake_minimum_required(VERSION 2.8.10)
# This is required to ensure the correct node modules are included in the project
execute_process(COMMAND unity-js-scopes-tool install ${CMAKE_SOURCE_DIR}/src/node_modules unity-js-scopes)
add_custom_target(build_modules ALL COMMAND unity-js-scopes-tool build ${CMAKE_SOURCE_DIR}/src/node_modules)
# Do not remove this, its required for the correct functionality of the Ubuntu-SDK
set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Tells QtCreator location and name of the manifest file")
set(UBUNTU_PROJECT_TYPE "Scope" CACHE INTERNAL "Tells QtCreator this is a Scope project")
# Important project paths
set(CMAKE_INSTALL_PREFIX /)
set(SCOPE_INSTALL_DIR "/wattpad")
set(GETTEXT_PACKAGE "wattpad")
set(PACKAGE_NAME "wattpad.boghison")
set(SCOPE_NAME "${PACKAGE_NAME}_wattpad")
# This command figures out the target architecture and puts it into the manifest file
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_ARCH
OUTPUT_VARIABLE CLICK_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Install the manifest and apparmor files
configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION "/")
install(FILES "wattpad.apparmor" DESTINATION "/")
# Make these files show up in QtCreator
file(GLOB_RECURSE
_PO_JS_FILES
"po/*.po"
"*.js"
)
add_custom_target(hidden_files
ALL
SOURCES
manifest.json.in
wattpad.apparmor
src/data/wattpad.ini.in
src/data/wattpad-settings.ini.in
po/POTFILES.in.in
po/${GETTEXT_PACKAGE}.pot
${_PO_JS_FILES}
)
# Search for our dependencies
find_package(Intltool)
# Add our main directories
add_subdirectory(po)
add_subdirectory(src)