1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License").
4
+ # You may not use this file except in compliance with the License.
5
+ # A copy of the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is distributed
10
+ # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11
+ # express or implied. See the License for the specific language governing
12
+ # permissions and limitations under the License.
13
+
1
14
set (CMAKE_CXX_STANDARD 11)
2
15
3
16
# Set template depth to support pegtl on older versions of clang.
4
17
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
5
18
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024" )
6
19
endif ()
7
20
8
- add_library (apl STATIC
9
- src/action/action.cpp
10
- src/action/animateitemaction.cpp
11
- src/action/autopageaction.cpp
12
- src/action/arrayaction.cpp
13
- src/action/extensioneventaction.cpp
14
- src/action/documentaction.cpp
15
- src/action/openurlaction.cpp
16
- src/action/scrolltoaction.cpp
17
- src/action/sequentialaction.cpp
18
- src/action/setpageaction.cpp
19
- src/action/speakitemaction.cpp
20
- src/action/speaklistaction.cpp
21
- src/animation/animatedproperty.cpp
22
- src/animation/easing.cpp
23
- src/command /arraycommand.cpp
24
- src/command /commandfactory.cpp
25
- src/command /commandproperties.cpp
26
- src/command /corecommand.cpp
27
- src/command /extensioneventcommand.cpp
28
- src/command /documentcommand.cpp
29
- src/component /actionablecomponent.cpp
30
- src/component /component .cpp
31
- src/component /componentproperties.cpp
32
- src/component /containercomponent.cpp
33
- src/component /corecomponent.cpp
34
- src/component /framecomponent.cpp
35
- src/component /imagecomponent.cpp
36
- src/component /pagercomponent.cpp
37
- src/component /scrollablecomponent.cpp
38
- src/component /scrollviewcomponent.cpp
39
- src/component /sequencecomponent.cpp
40
- src/component /textcomponent.cpp
41
- src/component /textmeasurement.cpp
42
- src/component /touchwrappercomponent.cpp
43
- src/component /vectorgraphiccomponent.cpp
44
- src/component /videocomponent.cpp
45
- src/component /yogaproperties.cpp
46
- src/content /aplversion.cpp
47
- src/content /content .cpp
48
- src/content /directive.cpp
49
- src/content /importrequest.cpp
50
- src/content /jsondata.cpp
51
- src/content /metrics.cpp
52
- src/content /package.cpp
53
- src/content /rootconfig.cpp
54
- src/content /viewport.cpp
55
- src/datagrammar/boundsymbol.cpp
56
- src/datagrammar/functions.cpp
57
- src/datagrammar/node.cpp
58
- src/datasource/datasource.cpp
59
- src/datasource/dynamicindexlistdatasourceprovider.cpp
60
- src/datasource/offsetindexdatasourceconnection.cpp
61
- src/engine/arrayify.cpp
62
- src/engine/binding.cpp
63
- src/engine/builder.cpp
64
- src/engine/context.cpp
65
- src/engine/componentdependant.cpp
66
- src/engine/contextdependant.cpp
67
- src/engine/contextobject.cpp
68
- src/engine/dependant.cpp
69
- src/engine/evaluate.cpp
70
- src/engine/event.cpp
71
- src/engine/extensionmanager.cpp
72
- src/engine/focusmanager.cpp
73
- src/engine/hovermanager.cpp
74
- src/engine/info.cpp
75
- src/engine/keyboardmanager.cpp
76
- src/engine/parameterarray.cpp
77
- src/engine/propdef.cpp
78
- src/engine/properties.cpp
79
- src/engine/resources.cpp
80
- src/engine/rootcontext.cpp
81
- src/engine/rootcontextdata.cpp
82
- src/engine/state.cpp
83
- src/engine/styleinstance.cpp
84
- src/engine/styledefinition.cpp
85
- src/engine/styles.cpp
86
- src/livedata/livearrayobject.cpp
87
- src/livedata/livedataobject.cpp
88
- src/livedata/livedatamanager.cpp
89
- src/livedata/layoutrebuilder.cpp
90
- src/livedata/livearray.cpp
91
- src/livedata/livemap.cpp
92
- src/livedata/livemapobject.cpp
93
- src/graphic/graphic.cpp
94
- src/graphic/graphiccontent.cpp
95
- src/graphic/graphicdependant.cpp
96
- src/graphic/graphicelement.cpp
97
- src/graphic/graphicproperties.cpp
98
- src/primitives/color.cpp
99
- src/primitives/dimension.cpp
100
- src/primitives/filter .cpp
101
- src/primitives/functions.cpp
102
- src/primitives/gradient.cpp
103
- src/primitives/keyboard.cpp
104
- src/primitives/mediasource.cpp
105
- src/primitives/radii.cpp
106
- src/primitives/rect.cpp
107
- src/primitives/symbolreferencemap.cpp
108
- src/primitives/styledtext.cpp
109
- src/primitives/timefunctions.cpp
110
- src/primitives/timegrammar.cpp
111
- src/primitives/transform.cpp
112
- src/primitives/transform2d.cpp
113
- src/primitives/object.cpp
114
- src/scaling/metricstransform.cpp
115
- src/scaling/scalingcalculator.cpp
116
- src/time/sequencer.cpp
117
- src/utils/log .cpp
118
- src/utils/path .cpp
119
- src/utils/session.cpp
120
- src/utils/telemetry.cpp)
21
+ include (target_sources_local.cmake)
22
+
23
+ # Check for the presence of GIT
24
+ # Code from: https://gist.github.com/rkitover
25
+ find_package (Git)
26
+ if (GIT_FOUND)
27
+ execute_process (COMMAND "${GIT_EXECUTABLE} " describe --tags --dirty
28
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} "
29
+ RESULT_VARIABLE res
30
+ OUTPUT_VARIABLE CORE_REPOSITORY_VERSION
31
+ OUTPUT_STRIP_TRAILING_WHITESPACE
32
+ ERROR_QUIET)
33
+ if (res)
34
+ message (VERBOSE "Git repository not found in directory ${CMAKE_CURRENT_SOURCE_DIR} , not setting version info" )
35
+ set (CORE_REPOSITORY_VERSION "unknown" )
36
+ endif ()
37
+ else ()
38
+ message (VERBOSE "Git program not found (${GIT_FOUND} ), not setting version info" )
39
+ SET (CORE_REPOSITORY_VERSION "unknown" )
40
+ endif ()
41
+
42
+ message (STATUS "Core Repository Version ${CORE_REPOSITORY_VERSION} " )
43
+ configure_file (buildTimeConstants.cpp.in buildTimeConstants.cpp @ONLY)
44
+
45
+ add_library (apl STATIC ${CMAKE_CURRENT_BINARY_DIR} /buildTimeConstants.cpp)
46
+
47
+ add_subdirectory (src/action)
48
+ add_subdirectory (src/animation)
49
+ add_subdirectory (src/command )
50
+ add_subdirectory (src/component )
51
+ add_subdirectory (src/content )
52
+ add_subdirectory (src/datagrammar)
53
+ add_subdirectory (src/datasource)
54
+ add_subdirectory (src/engine)
55
+ add_subdirectory (src/extension)
56
+ add_subdirectory (src/graphic)
57
+ add_subdirectory (src/livedata)
58
+ add_subdirectory (src/primitives)
59
+ add_subdirectory (src/scaling)
60
+ add_subdirectory (src/time)
61
+ add_subdirectory (src/touch)
62
+ add_subdirectory (src/utils)
63
+
64
+ set (PUBLIC_HEADER_LIST
65
+ include /apl/apl.h
66
+ include /apl/dynamicdata.h)
121
67
122
68
set_target_properties (apl PROPERTIES
123
69
VERSION "${PROJECT_VERSION} "
124
70
SOVERSION 1
125
- PUBLIC_HEADER include /apl/apl.h )
71
+ PUBLIC_HEADER " ${PUBLIC_HEADER_LIST} " )
126
72
127
73
configure_file (apl.pc.in apl.pc @ONLY)
128
74
target_include_directories (apl PRIVATE include )
@@ -167,4 +113,4 @@ target_link_libraries(
167
113
# Links the target library to the log library included in the NDK.
168
114
${log -lib})
169
115
170
- endif (ANDROID)
116
+ endif (ANDROID)
0 commit comments