@@ -57,13 +57,12 @@ if (TARGET yoga)
57
57
add_dependencies (apl yoga)
58
58
endif ()
59
59
60
- if (NOT HAS_FETCH_CONTENT )
61
- add_dependencies (apl pegtl- build )
60
+ if (NOT USE_PROVIDED_YOGA_INLINE )
61
+ target_link_libraries (apl PUBLIC $<BUILD_INTERFACE:libyoga> )
62
62
endif ()
63
63
64
- # When not using the system rapidjson build the library, add a dependency on the build step
65
- if (NOT USE_SYSTEM_RAPIDJSON AND NOT HAS_FETCH_CONTENT)
66
- add_dependencies (apl rapidjson-build )
64
+ if (NOT HAS_FETCH_CONTENT)
65
+ add_dependencies (apl pegtl-build )
67
66
endif ()
68
67
69
68
add_subdirectory (src/action)
@@ -75,6 +74,7 @@ add_subdirectory(src/content)
75
74
add_subdirectory (src/datagrammar)
76
75
add_subdirectory (src/datasource)
77
76
add_subdirectory (src/document)
77
+ add_subdirectory (src/embed)
78
78
add_subdirectory (src/engine)
79
79
add_subdirectory (src/extension)
80
80
add_subdirectory (src/focus)
@@ -100,7 +100,9 @@ set_target_properties(apl
100
100
PROPERTIES
101
101
VERSION "${PROJECT_VERSION} "
102
102
SOVERSION 1
103
- PUBLIC_HEADER "${PUBLIC_HEADER_LIST} " )
103
+ PUBLIC_HEADER "${PUBLIC_HEADER_LIST} "
104
+ EXPORT_NAME "core"
105
+ )
104
106
105
107
if (ENABLE_PIC)
106
108
set_target_properties (apl
@@ -116,19 +118,16 @@ target_include_directories(apl
116
118
PUBLIC
117
119
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /include >
118
120
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR} /aplcore/include >
119
- $<BUILD_INTERFACE:${RAPIDJSON_INCLUDE} >
120
121
$<INSTALL_INTERFACE:include >
121
122
PRIVATE
122
123
$<BUILD_INTERFACE:${PEGTL_INCLUDE} >
123
124
$<BUILD_INTERFACE:${YOGA_INCLUDE} >
124
125
)
125
126
127
+ target_link_libraries (apl PUBLIC rapidjson-apl)
128
+
126
129
if (USE_PROVIDED_YOGA_INLINE)
127
130
target_sources (apl PRIVATE ${YOGA_SRC} )
128
- else ()
129
- target_link_libraries (apl
130
- PRIVATE
131
- libyoga)
132
131
endif ()
133
132
134
133
# include the alexa extensions library
@@ -159,6 +158,12 @@ target_link_libraries(apl PRIVATE ${log-lib})
159
158
160
159
endif (ANDROID)
161
160
161
+ # Test cases are built conditionally. Only affect core do not build them for everything else.
162
+ if (BUILD_UNIT_TESTS)
163
+ include_directories (${GTEST_INCLUDE} )
164
+ add_subdirectory (unit)
165
+ endif (BUILD_UNIT_TESTS)
166
+
162
167
install (TARGETS apl
163
168
EXPORT apl-targets
164
169
ARCHIVE DESTINATION lib
@@ -173,12 +178,6 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/aplcore/include/apl
173
178
install (FILES ${CMAKE_CURRENT_BINARY_DIR} /apl.pc
174
179
DESTINATION lib/pkgconfig)
175
180
176
- if (NOT USE_SYSTEM_RAPIDJSON)
177
- install (DIRECTORY ${RAPIDJSON_INCLUDE} /rapidjson
178
- DESTINATION include
179
- FILES_MATCHING PATTERN "*.h" )
180
- endif ()
181
-
182
181
if (USE_PROVIDED_YOGA_AS_LIB)
183
182
# We built the bundled yoga lib, install it
184
183
install (FILES ${YOGA_LIB}
@@ -189,16 +188,6 @@ if (USE_PROVIDED_YOGA_AS_LIB)
189
188
set (YOGA_EXTERNAL_LIB ${YOGA_LIB} ) # used by aplcoreConfig.cmake.in
190
189
endif ()
191
190
192
- if (NOT USE_PROVIDED_YOGA_INLINE)
193
- set_target_properties (apl PROPERTIES
194
- EXPORT_NAME
195
- core
196
- INTERFACE_LINK_LIBRARIES
197
- # Only set this for builds, the find module will handle the other cases
198
- $<BUILD_INTERFACE:${YOGA_LIB} >
199
- )
200
- endif ()
201
-
202
191
export (
203
192
EXPORT
204
193
apl-targets
@@ -227,4 +216,4 @@ install(
227
216
${CMAKE_CURRENT_BINARY_DIR} /aplcoreConfig.cmake
228
217
DESTINATION
229
218
lib/cmake/aplcore
230
- )
219
+ )
0 commit comments