-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
78 lines (62 loc) · 3.22 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
CMAKE_MINIMUM_REQUIRED (VERSION 3.27.5)
PROJECT (Pocketbook-Nextcloud VERSION 1.10)
find_package(CURL REQUIRED)
find_package(SQLite3 REQUIRED)
add_compile_options(-std=c++17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Where to build the targets
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
#Set if building with docker
SET(PB_INCLUDE_DIRECTORIES $ENV{SDK_BASE}/usr/arm-obreey-linux-gnueabi/sysroot/usr/local/include/)
SET(FREETYPE_INCLUDE_DIRS $ENV{SDK_BASE}/usr/arm-obreey-linux-gnueabi/sysroot/usr/include/freetype2/)
#Set if building without docker
SET(PB_INCLUDE_DIRECTORIES ${SDK_BASE}/usr/arm-obreey-linux-gnueabi/sysroot/usr/local/include/)
SET(FREETYPE_INCLUDE_DIRS ${SDK_BASE}/usr/arm-obreey-linux-gnueabi/sysroot/usr/include/freetype2/)
# Include the SDK
SET(CMAKE_TOOLCHAIN_FILE $ENV{SDK_BASE}/share/cmake/arm_conf.cmake)
include("${CMAKE_TOOLCHAIN_FILE}")
# Where to find pbres
string(REGEX REPLACE "[^/]+$" "pbres" PBRES "${CMAKE_C_COMPILER}")
# Add the standard link directories
link_directories("${PB_LINK_DIRECTORIES}")
# Add the standard include directories
include_directories("${PB_INCLUDE_DIRECTORIES}")
include_directories("${FREETYPE_INCLUDE_DIRS}")
include_directories(
#$(TARGET_INCLUDE)
${CMAKE_SOURCE_DIR}/src/handler/
${CMAKE_SOURCE_DIR}/src/util/
${CMAKE_SOURCE_DIR}/src/ui/
${CMAKE_SOURCE_DIR}/src/ui/webDAVView/
${CMAKE_SOURCE_DIR}/src/ui/fileView/
${CMAKE_SOURCE_DIR}/src/ui/loginView/
${CMAKE_SOURCE_DIR}/src/ui/excludeFileView/
${CMAKE_SOURCE_DIR}/src/api/
)
set(SOURCES
${CMAKE_SOURCE_DIR}/src/main.cpp
${CMAKE_SOURCE_DIR}/src/handler/contextMenu.cpp
${CMAKE_SOURCE_DIR}/src/handler/eventHandler.cpp
${CMAKE_SOURCE_DIR}/src/handler/mainMenu.cpp
${CMAKE_SOURCE_DIR}/src/handler/fileHandler.cpp
${CMAKE_SOURCE_DIR}/src/ui/listView.cpp
${CMAKE_SOURCE_DIR}/src/ui/listViewEntry.cpp
${CMAKE_SOURCE_DIR}/src/ui/webDAVView/webDAVView.cpp
${CMAKE_SOURCE_DIR}/src/ui/webDAVView/webDAVViewEntry.cpp
${CMAKE_SOURCE_DIR}/src/ui/loginView/loginView.cpp
${CMAKE_SOURCE_DIR}/src/ui/fileView/fileView.cpp
${CMAKE_SOURCE_DIR}/src/ui/fileView/fileViewEntry.cpp
${CMAKE_SOURCE_DIR}/src/ui/excludeFileView/excludeFileView.cpp
${CMAKE_SOURCE_DIR}/src/util/util.cpp
${CMAKE_SOURCE_DIR}/src/util/log.cpp
${CMAKE_SOURCE_DIR}/src/api/webDAV.cpp
${CMAKE_SOURCE_DIR}/src/api/sqliteConnector.cpp
${CMAKE_SOURCE_DIR}/src/api/fileBrowser.cpp
)
add_executable(Nextcloud.app ${SOURCES})
target_compile_options(Nextcloud.app PRIVATE -Wall -Wextra -Wpedantic -Werror -pedantic -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused)
TARGET_LINK_LIBRARIES (Nextcloud.app PRIVATE inkview freetype stdc++fs CURL::libcurl sqlite3)
target_compile_definitions(Nextcloud.app PRIVATE DBVERSION=2 PROGRAMVERSION="1.10")
INSTALL (TARGETS Nextcloud.app)