Commit fb12408f authored by David Youssefi's avatar David Youssefi

ENH: Add tinyxml recipe

parent a10bb7ae
#
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
cmake_minimum_required(VERSION 2.8.3)
project(tinyXMLlib)
option(BUILD_SHARED_LIBS "Building shared libs. Default is ON" ON)
if(MSVC AND BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
add_definitions(-DTIXML_USE_STL=1)
set(tinyXMLlib_SRCS
tinystr.cpp
tinyxml.cpp
tinyxmlerror.cpp
tinyxmlparser.cpp)
set(tinyXMLlib_HDRS
tinystr.h
tinyxml.h)
add_library(tinyxml ${tinyXMLlib_SRCS})
install(TARGETS tinyxml
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(FILES ${tinyXMLlib_HDRS}
DESTINATION include)
#!/usr/bin/env bash
set +x
set -e # Abort on error
[[ -d build ]] || mkdir build
cd build
if [[ $target_platform =~ linux.* ]]; then
export LDFLAGS="$LDFLAGS -Wl,-rpath-link,${PREFIX}/lib"
fi
CC=${BUILD_PREFIX}/bin/${HOST}-gcc CXX=$BUILD_PREFIX/bin/${HOST}-g++ \
cmake -G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DBUILD_SHARED_LIBS:BOOL=ON ..
ninja install
{% set version = "2.6.2" %}
{% set version_under = version.replace(".", "_") %}
package:
name: tinyxml
version: {{ version }}
source:
- url: https://sourceforge.net/projects/tinyxml/files/tinyxml/{{ version }}/tinyxml_{{ version_under }}.tar.gz
sha1: cba3f50dd657cb1434674a03b21394df9913d764
md5: c1b864c96804a10526540c664ade67f0
- path: CMakeLists.txt
build:
number: 1000
requirements:
build:
- cmake
- ninja
- {{ compiler('c') }}
- {{ compiler('cxx') }}
test:
commands:
- test -f ${PREFIX}/tinyxml.h # [unix]
- if not exist %PREFIX%\\Library\\tinyxml.h exit 1 # [win]
- conda inspect linkages -p ${PREFIX} tinyxml # [not win]
- conda inspect objects -p ${PREFIX} tinyxml # [osx]
about:
home: http://www.grinninglizard.com/tinyxml/
license: ZLib license
license_file: readme.txt
summary: A simple, small, minimal, C++ XML parser
extra:
recipe-maintainers:
- CNES
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment