1 ###########################################################################
2 # Copyright 2015, 2016, 2017 IoT.bzh
4 # author: Fulup Ar Foll <fulup@iot.bzh>
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 ###########################################################################
19 set(MXML external-mxml)
20 set(MXML_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mxml)
21 include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
22 ExternalProject_Add(${MXML}
23 GIT_REPOSITORY https://github.com/michaelrsweet/mxml.git
25 SOURCE_DIR ${MXML_SOURCE_DIR}
26 CONFIGURE_COMMAND ./configure --build x86_64 --host aarch64
27 BUILD_COMMAND make libmxml.so.1.5
32 PROJECT_TARGET_ADD(mxml)
34 add_library(${TARGET_NAME} SHARED IMPORTED GLOBAL)
36 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
38 IMPORTED_LOCATION ${MXML_SOURCE_DIR}/libmxml.so.1
39 INTERFACE_INCLUDE_DIRECTORIES ${MXML_SOURCE_DIR}
42 add_dependencies(${TARGET_NAME} ${MXML})