forked from stlab/adobe_platform_libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
108 lines (86 loc) · 3.93 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
cmake_minimum_required(VERSION 3.0)
include(FindPkgConfig)
enable_testing()
project(adobe_platform_libraries CXX)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD c++0x)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY libc++)
add_subdirectory(../adobe_source_libraries ${CMAKE_BINARY_DIR}/imported/asl)
aux_source_directory(backend/gtk/adobe/future/widgets/sources PLATFORM_FUTURE_WIDGET_SOURCES)
aux_source_directory(backend/gtk/adobe/future/source PLATFORM_FUTURE_SOURCES)
aux_source_directory(backend/template/ PLATFORM_FUTURE_TEMPLATES)
aux_source_directory(adobe/future/widgets/sources FUTURE_WIDGET_SOURCES)
aux_source_directory(adobe/future/source FUTURE_SOURCES)
aux_source_directory(source NON_FUTURE_SOURCES)
file(GLOB_RECURSE PLATFORM_INC_LIST backend/*.hpp)
file(GLOB_RECURSE INC_LIST adobe/*.hpp)
# not yet handled in current GTK backend
list(REMOVE_ITEM FUTURE_WIDGET_SOURCES
adobe/future/widgets/sources/platform_presets.cpp
adobe/future/widgets/sources/presets_factory.cpp
adobe/future/widgets/sources/presets_common.cpp
adobe/future/widgets/sources/link_factory.cpp
adobe/future/widgets/sources/image_factory.cpp
)
# not needed in current state of GTK backend
list(REMOVE_ITEM FUTURE_SOURCES
adobe/future/source/cmd_system.cpp
adobe/future/source/drag_and_drop.cpp
adobe/future/source/menu_system.cpp
)
# not needed in current state of GTK backend
list(REMOVE_ITEM NON_FUTURE_SOURCES
source/expression_formatter.cpp
source/formatter_tokens.cpp
source/layout_formatter.cpp
source/property_model_formatter.cpp
)
add_library(apl
${PLATFORM_FUTURE_WIDGET_SOURCES}
${PLATFORM_FUTURE_SOURCES}
${PLATFORM_FUTURE_TEMPLATES}
${FUTURE_WIDGET_SOURCES}
${FUTURE_SOURCES}
${NON_FUTURE_SOURCES}
${PLATFORM_INC_LIST}
${INC_LIST})
target_compile_options(apl PRIVATE -Wall)
target_compile_options(apl PRIVATE -Werror)
# for view_concept and controller_concept checks
target_compile_options(apl PRIVATE -Wno-unused-local-typedefs)
target_compile_definitions(apl PUBLIC ADOBE_PLATFORM_GTK)
# name based (vs image based) toggle widget in current GTK backend
target_compile_definitions(apl PRIVATE ADOBE_PLATFORM_TOGGLE_NAME)
# not yet handled in current GTK backend (see source files excluded above)
target_compile_definitions(apl PRIVATE ADOBE_PLATFORM_NO_PRESETS)
target_compile_definitions(apl PRIVATE ADOBE_PLATFORM_NO_LINK)
target_compile_definitions(apl PRIVATE ADOBE_PLATFORM_NO_IMAGE)
option(BROWSE_WINDOWS_BACKEND "add windows backend code for convenience (not built)" OFF)
if (BROWSE_WINDOWS_BACKEND)
aux_source_directory(windows/adobe/future/widgets/sources WIN_PLATFORM_FUTURE_WIDGET_SOURCES)
aux_source_directory(windows/adobe/future/source WIN_PLATFORM_FUTURE_SOURCES)
file(GLOB_RECURSE WIN_PLATFORM_INC_LIST windows/*.hpp)
add_library(windows EXCLUDE_FROM_ALL
${WIN_PLATFORM_FUTURE_WIDGET_SOURCES}
${WIN_PLATFORM_FUTURE_SOURCES}
${WIN_PLATFORM_INC_LIST})
endif()
option(BROWSE_MACINTOSH_BACKEND "add macintosh backend code for convenience (not built)" OFF)
if (BROWSE_WINDOWS_BACKEND)
aux_source_directory(macintosh/adobe/future/widgets/sources MAC_PLATFORM_FUTURE_WIDGET_SOURCES)
aux_source_directory(macintosh/adobe/future/source MAC_PLATFORM_FUTURE_SOURCES)
file(GLOB_RECURSE MAC_PLATFORM_INC_LIST macintosh/*.hpp)
add_library(macintosh EXCLUDE_FROM_ALL
${MAC_PLATFORM_FUTURE_WIDGET_SOURCES}
${MAC_PLATFORM_FUTURE_SOURCES}
${MAC_PLATFORM_INC_LIST})
endif()
target_include_directories(apl PUBLIC .)
target_include_directories(apl PUBLIC backend/template)
target_include_directories(apl PUBLIC backend/gtk)
target_link_libraries(apl PUBLIC asl)
pkg_check_modules(GTK REQUIRED gtk+-3.0)
target_include_directories(apl SYSTEM PUBLIC ${GTK_INCLUDE_DIRS})
target_link_libraries(apl PUBLIC ${GTK_LIBRARIES})
add_subdirectory(test)