diff --git a/.github/workflows/ci-unixish.yml b/.github/workflows/ci-unixish.yml deleted file mode 100644 index ab17d94..0000000 --- a/.github/workflows/ci-unixish.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: C/C++ CI Unixish - -on: [push, pull_request] - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v2 - - name: make - run: make - - name: make check - run: make check - - name: Install - run: sudo make install diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..049f8cd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,111 @@ +name: Test +on: [ push, pull_request ] +jobs: + test: + name: ${{ matrix.os }}, ${{ matrix.cmake_name }} + strategy: + fail-fast: false + matrix: + os: [ windows-2019, macos-10.15, ubuntu-20.04 ] + cmake: [ 3.15, 3.x ] + include: + - os: windows-2019 + static_postfix: _static + tree: tree /F + CXX: cl + + - os: ubuntu-20.04 + tree: tree + + - os: macos-10.15 + tree: find + + - cmake: 3.15 + cmake_name: CMake 3.15 + - cmake: 3.x + cmake_name: Latest CMake + env: + # CMake 3.15 doesn't detect Visual Studio correctly without these. + CXX: ${{ matrix.CXX }} + CC: ${{ matrix.CXX }} + runs-on: ${{ matrix.os }} + steps: + # System set-up + - uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + - uses: seanmiddleditch/gha-setup-ninja@master + - uses: jwlawson/actions-setup-cmake@v1.8 + with: + cmake-version: ${{ matrix.cmake }} + + # Static Debug + - name: "Static Debug: Configure" + run: cmake -G Ninja -S . -B build-static-dbg -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_DEBUG_POSTFIX=d${{matrix.static_postfix}}" + - name: "Static Debug: Build" + run: cmake --build build-static-dbg + - name: "Static Debug: Test" + run: ctest --output-on-failure + working-directory: build-static-dbg + + # Shared Debug + - name: "Shared Debug: Configure" + run: cmake -G Ninja -S . -B build-shared-dbg -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_POSTFIX=d -DBUILD_SHARED_LIBS=ON + - name: "Shared Debug: Build" + run: cmake --build build-shared-dbg + - name: "Shared Debug: Test" + run: ctest --output-on-failure + working-directory: build-shared-dbg + + # Static Release + - name: "Static Release: Configure" + run: cmake -G Ninja -S . -B build-static-rel -DCMAKE_BUILD_TYPE=Release "-DCMAKE_RELEASE_POSTFIX=${{matrix.static_postfix}}" + - name: "Static Release: Build" + run: cmake --build build-static-rel + - name: "Static Release: Test" + run: ctest --output-on-failure + working-directory: build-static-rel + + # Shared Release + - name: "Shared Release: Configure" + run: cmake -G Ninja -S . -B build-shared-rel -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON + - name: "Shared Release: Build" + run: cmake --build build-shared-rel + - name: "Shared Release: Test" + run: ctest --output-on-failure + working-directory: build-shared-rel + + # Joint install + - name: Install + run: | + cmake --install build-shared-dbg --prefix install + cmake --install build-static-dbg --prefix install + cmake --install build-shared-rel --prefix install + cmake --install build-static-rel --prefix install + - name: List install tree + run: ${{matrix.tree}} install + + # Test find_package + - name: "Test find_package: Static Debug" + run: >- + ctest --build-and-test test test-static-dbg + --build-generator Ninja + --build-options -DCMAKE_BUILD_TYPE=Debug -Dtinyxml2_SHARED_LIBS=NO -DCMAKE_PREFIX_PATH=${{github.workspace}}/install + --test-command ctest --output-on-failure + - name: "Test find_package: Static Release" + run: >- + ctest --build-and-test test test-static-rel + --build-generator Ninja + --build-options -DCMAKE_BUILD_TYPE=Release -Dtinyxml2_SHARED_LIBS=NO -DCMAKE_PREFIX_PATH=${{github.workspace}}/install + --test-command ctest --output-on-failure + - name: "Test find_package: Shared Debug" + run: >- + ctest --build-and-test test test-shared-dbg + --build-generator Ninja + --build-options -DCMAKE_BUILD_TYPE=Debug -Dtinyxml2_SHARED_LIBS=YES -DCMAKE_PREFIX_PATH=${{github.workspace}}/install + --test-command ctest --output-on-failure + - name: "Test find_package: Shared Release" + run: >- + ctest --build-and-test test test-shared-rel + --build-generator Ninja + --build-options -DCMAKE_BUILD_TYPE=Release -Dtinyxml2_SHARED_LIBS=YES -DCMAKE_PREFIX_PATH=${{github.workspace}}/install + --test-command ctest --output-on-failure diff --git a/.gitignore b/.gitignore index 3d32441..2c3e2b3 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ tinyxml2/temp/ *.vc.opendb libtinyxml2.a xmltest +vs/debug + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0634ccb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: cpp - -os: - - linux - - osx - -compiler: - - g++ - - clang - -before_script: cmake . - -script: - - make -j3 - - make test diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c13dbe..2b8f790 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,148 +1,129 @@ -IF(BIICODE) - ADD_BIICODE_TARGETS() - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/resources) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/resources DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - ENDIF() - RETURN() -ENDIF(BIICODE) -cmake_minimum_required(VERSION 2.6 FATAL_ERROR) -cmake_policy(VERSION 2.6) -if(POLICY CMP0063) - cmake_policy(SET CMP0063 OLD) -endif() +cmake_minimum_required(VERSION 3.15) +project(tinyxml2 VERSION 8.0.0) -project(tinyxml2) -include(GNUInstallDirs) include(CTest) -#enable_testing() +option(tinyxml2_BUILD_TESTING "Build tests for tinyxml2" "${BUILD_TESTING}") -#CMAKE_BUILD_TOOL +## +## Honor tinyxml2_SHARED_LIBS to match install interface +## -################################ -# set lib version here +if (DEFINED tinyxml2_SHARED_LIBS) + set(BUILD_SHARED_LIBS "${tinyxml2_SHARED_LIBS}") +endif () -set(GENERIC_LIB_VERSION "8.0.0") -set(GENERIC_LIB_SOVERSION "8") - -################################ -# Add definitions - -################################ -# Add targets -# By Default shared library is being built -# User can choose to build static library by using cmake -DBUILD_SHARED_LIBS:BOOL=OFF -# To build the tests, use cmake . -DBUILD_TESTS:BOOL=ON -# To disable the building of the tests, use cmake . -DBUILD_TESTS:BOOL=OFF - -option(BUILD_SHARED_LIBS "build as shared library" ON) -option(BUILD_TESTS "build xmltest (deprecated: Use BUILD_TESTING)" ON) - -# To allow using tinyxml in another shared library -set(CMAKE_POSITION_INDEPENDENT_CODE ON) +## +## Main library build +## set(CMAKE_CXX_VISIBILITY_PRESET hidden) -set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) - -# to distinguish between debug and release lib -set(CMAKE_DEBUG_POSTFIX "d") - -set(TARGETS_EXPORT_NAME "${CMAKE_PROJECT_NAME}Targets") +set(CMAKE_VISIBILITY_INLINES_HIDDEN YES) add_library(tinyxml2 tinyxml2.cpp tinyxml2.h) +add_library(tinyxml2::tinyxml2 ALIAS tinyxml2) -set_target_properties(tinyxml2 PROPERTIES - DEFINE_SYMBOL "TINYXML2_EXPORT" - VERSION "${GENERIC_LIB_VERSION}" - SOVERSION "${GENERIC_LIB_SOVERSION}") +# Uncomment the following line to require C++11 (or greater) to use tinyxml2 +# target_compile_features(tinyxml2 PUBLIC cxx_std_11) +target_include_directories(tinyxml2 PUBLIC "$") -target_compile_definitions(tinyxml2 PUBLIC $<$:TINYXML2_DEBUG>) +target_compile_definitions( + tinyxml2 + PUBLIC $<$:TINYXML2_DEBUG> + INTERFACE $<$:TINYXML2_IMPORT> + PRIVATE $<$:_CRT_SECURE_NO_WARNINGS> +) -if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") - target_include_directories(tinyxml2 PUBLIC - $ - $) +set_target_properties( + tinyxml2 + PROPERTIES + DEFINE_SYMBOL "TINYXML2_EXPORT" + VERSION "${tinyxml2_VERSION}" + SOVERSION "${tinyxml2_VERSION_MAJOR}" +) - if(MSVC) - target_compile_definitions(tinyxml2 PUBLIC -D_CRT_SECURE_NO_WARNINGS) - endif(MSVC) -else() - include_directories(${PROJECT_SOURCE_DIR}) +if (tinyxml2_BUILD_TESTING) + add_executable(xmltest xmltest.cpp) + target_link_libraries(xmltest PRIVATE tinyxml2::tinyxml2) - if(MSVC) - add_definitions(-D_CRT_SECURE_NO_WARNINGS) - endif(MSVC) -endif() + add_test( + NAME xmltest + COMMAND xmltest + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) -# Export cmake script that can be used by downstream project -# via `include()` -export(TARGETS tinyxml2 - NAMESPACE tinyxml2:: - FILE ${CMAKE_BINARY_DIR}/${TARGETS_EXPORT_NAME}.cmake) + set_tests_properties(xmltest PROPERTIES PASS_REGULAR_EXPRESSION ", Fail 0") +endif () -install(TARGETS tinyxml2 - EXPORT ${TARGETS_EXPORT_NAME} - RUNTIME - DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT tinyxml2_runtime - LIBRARY - DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT tinyxml2_libraries - ARCHIVE - DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT tinyxml2_libraries) - -if(BUILD_TESTING AND BUILD_TESTS) - add_executable(xmltest xmltest.cpp) - add_dependencies(xmltest tinyxml2) - target_link_libraries(xmltest tinyxml2) - - # Copy test resources and create test output directory - add_custom_command(TARGET xmltest POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/resources $/resources - COMMAND ${CMAKE_COMMAND} -E make_directory $/resources/out - COMMENT "Configuring xmltest resources directory: ${CMAKE_CURRENT_BINARY_DIR}/resources" - ) - - add_test(NAME xmltest COMMAND xmltest WORKING_DIRECTORY $) -endif() - -install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT tinyxml2_headers) - -if(CMAKE_BUILD_TYPE MATCHES Debug) - set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX}) -endif() -configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT tinyxml2_config) - -# uninstall target -if(NOT TARGET uninstall) - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) - - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -endif() +## +## Installation +## +## Standard modules +include(GNUInstallDirs) include(CMakePackageConfigHelpers) -configure_package_config_file( - "Config.cmake.in" - "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake" - INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}" -) -write_basic_package_version_file( - "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake" - VERSION ${GENERIC_LIB_VERSION} - COMPATIBILITY SameMajorVersion -) -install(FILES - ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake - ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME} - COMPONENT tinyxml2_config) -# Export targets for find_package config mode -install(EXPORT ${TARGETS_EXPORT_NAME} NAMESPACE tinyxml2:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME} - COMPONENT tinyxml2_config) +## Custom locations +set(tinyxml2_INSTALL_PKGCONFIGDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + CACHE PATH "Directory for pkgconfig files") + +set(tinyxml2_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/tinyxml2" + CACHE STRING "Path to tinyxml2 CMake files") + +## CMake targets and export scripts + +install( + TARGETS tinyxml2 EXPORT tinyxml2-targets + RUNTIME COMPONENT tinyxml2_runtime + LIBRARY COMPONENT tinyxml2_runtime + NAMELINK_COMPONENT tinyxml2_development + ARCHIVE COMPONENT tinyxml2_development + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +) + +# Type-specific targets + +if (BUILD_SHARED_LIBS) + set(type shared) +else () + set(type static) +endif () + +install( + EXPORT tinyxml2-targets + DESTINATION "${tinyxml2_INSTALL_CMAKEDIR}" + NAMESPACE tinyxml2:: + FILE tinyxml2-${type}-targets.cmake + COMPONENT tinyxml2_development +) + +# Auto-generated version compatibility file +write_basic_package_version_file( + tinyxml2-config-version.cmake + COMPATIBILITY SameMajorVersion +) + +install( + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/tinyxml2-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/tinyxml2-config-version.cmake" + DESTINATION "${tinyxml2_INSTALL_CMAKEDIR}" + COMPONENT tinyxml2_development +) + +## Headers + +install( + FILES tinyxml2.h + TYPE INCLUDE + COMPONENT tinyxml2_development +) + +## pkg-config + +configure_file(cmake/tinyxml2.pc.in tinyxml2.pc.gen @ONLY) +file(GENERATE OUTPUT tinyxml2.pc INPUT "${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc.gen") +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc" + DESTINATION "${tinyxml2_INSTALL_PKGCONFIGDIR}" + COMPONENT tinyxml2_development +) diff --git a/Config.cmake.in b/Config.cmake.in deleted file mode 100644 index 38bbde7..0000000 --- a/Config.cmake.in +++ /dev/null @@ -1,4 +0,0 @@ -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") -check_required_components("@PROJECT_NAME@") diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 0d5e86b..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,10 +0,0 @@ -before_build: - - cmake . - -build_script: - - msbuild tinyxml2.sln /m /p:Configuration=Debug /t:ALL_BUILD - - msbuild tinyxml2.sln /m /p:Configuration=Release /t:ALL_BUILD - - cd %APPVEYOR_BUILD_FOLDER%\Debug - - xmltest.exe - - cd %APPVEYOR_BUILD_FOLDER%\Release - - xmltest.exe diff --git a/biicode.conf b/biicode.conf deleted file mode 100644 index 5dca6b1..0000000 --- a/biicode.conf +++ /dev/null @@ -1,7 +0,0 @@ -# Biicode configuration file - -[paths] - / - -[dependencies] - xmltest.cpp + resources/*.xml \ No newline at end of file diff --git a/cmake/tinyxml2-config.cmake b/cmake/tinyxml2-config.cmake new file mode 100644 index 0000000..5baa364 --- /dev/null +++ b/cmake/tinyxml2-config.cmake @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.15) + +set(tinyxml2_known_comps static shared) +set(tinyxml2_comp_static NO) +set(tinyxml2_comp_shared NO) +foreach (tinyxml2_comp IN LISTS ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS) + if (tinyxml2_comp IN_LIST tinyxml2_known_comps) + set(tinyxml2_comp_${tinyxml2_comp} YES) + else () + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE + "tinyxml2 does not recognize component `${tinyxml2_comp}`.") + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + return() + endif () +endforeach () + +if (tinyxml2_comp_static AND tinyxml2_comp_shared) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE + "tinyxml2 `static` and `shared` components are mutually exclusive.") + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + return() +endif () + +set(tinyxml2_static_targets "${CMAKE_CURRENT_LIST_DIR}/tinyxml2-static-targets.cmake") +set(tinyxml2_shared_targets "${CMAKE_CURRENT_LIST_DIR}/tinyxml2-shared-targets.cmake") + +macro(tinyxml2_load_targets type) + if (NOT EXISTS "${tinyxml2_${type}_targets}") + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE + "tinyxml2 `${type}` libraries were requested but not found.") + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + return() + endif () + include("${tinyxml2_${type}_targets}") +endmacro() + +if (tinyxml2_comp_static) + tinyxml2_load_targets(static) +elseif (tinyxml2_comp_shared) + tinyxml2_load_targets(shared) +elseif (DEFINED tinyxml2_SHARED_LIBS AND tinyxml2_SHARED_LIBS) + tinyxml2_load_targets(shared) +elseif (DEFINED tinyxml2_SHARED_LIBS AND NOT tinyxml2_SHARED_LIBS) + tinyxml2_load_targets(static) +elseif (BUILD_SHARED_LIBS) + if (EXISTS "${tinyxml2_shared_targets}") + tinyxml2_load_targets(shared) + else () + tinyxml2_load_targets(static) + endif () +else () + if (EXISTS "${tinyxml2_static_targets}") + tinyxml2_load_targets(static) + else () + tinyxml2_load_targets(shared) + endif () +endif () diff --git a/tinyxml2.pc.in b/cmake/tinyxml2.pc.in similarity index 71% rename from tinyxml2.pc.in rename to cmake/tinyxml2.pc.in index b100f60..a4fe22f 100644 --- a/tinyxml2.pc.in +++ b/cmake/tinyxml2.pc.in @@ -5,6 +5,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ Name: TinyXML2 Description: simple, small, C++ XML parser -Version: @GENERIC_LIB_VERSION@ -Libs: -L${libdir} -ltinyxml2@LIB_POSTFIX@ +Version: @tinyxml2_VERSION@ +Libs: -L${libdir} -l$ Cflags: -I${includedir} diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in deleted file mode 100644 index 2c34c81..0000000 --- a/cmake_uninstall.cmake.in +++ /dev/null @@ -1,21 +0,0 @@ -if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") -endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - -file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -string(REGEX REPLACE "\n" ";" files "${files}") -foreach(file ${files}) - message(STATUS "Uninstalling $ENV{DESTDIR}${file}") - if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - exec_program( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - if(NOT "${rm_retval}" STREQUAL 0) - message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") - endif(NOT "${rm_retval}" STREQUAL 0) - else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - message(STATUS "File $ENV{DESTDIR}${file} does not exist.") - endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") -endforeach(file) \ No newline at end of file diff --git a/premake5.lua b/premake5.lua deleted file mode 100644 index 33f019c..0000000 --- a/premake5.lua +++ /dev/null @@ -1,95 +0,0 @@ --- --- Requires: Premake 5 (https://premake.github.io/) --- Usage: premake5 --file=premake5.lua [project / makefile format, refer to premake5 --help] --target=[target from below] --- - --- target option -tbl_target_values = -{ - { "windows", "VS2015 projects targeting Windows 32/64 bits" }, - { "macosx", "Xcode4 projects targeting OS X" }, -} - -newoption -{ - trigger = "target", - description = "Build environment and target to generate projects for.", - allowed = tbl_target_values -} - --- validation -target_env = _OPTIONS["target"] -if not target_env then - print "Command-line option --target is required with one of the following values:" - for _, v in ipairs(tbl_target_values) do - print(v[1]) - end - os.exit(1) -end - --- solution -workspace "tinyxml2" - - tbl_platforms = {} - if target_env == "windows" then - tbl_platforms = { - "x86", - "x64", - } - elseif target_env == "macosx" then - tbl_platforms = { - "Universal64" - } - end - platforms(tbl_platforms) - - tbl_configurations = { - "Debug", - "Release", - } - configurations(tbl_configurations) - - sln_location = ".projects/"..target_env - location(sln_location) - - bin_location = ".artifacts/"..target_env - obj_location = ".intermediate/"..target_env - - for _, p in ipairs(tbl_platforms) do - for _, c in ipairs(tbl_configurations) do - local pc = p.."-"..c - filter{ "platforms:"..p, c } - targetdir(bin_location.."/"..pc) - libdirs(bin_location.."/"..pc) - objdir(obj_location.."/"..pc) - end - end - - filter("not Release") - optimize "Debug" - symbols "On" - filter{ "Release" } - optimize "Full" - filter{} - - -- projects - project "tinyxml2" - - kind "staticlib" - - files { - "tinyxml2.h", - "tinyxml2.cpp" - } - - project "xmltest" - - kind "consoleapp" - - links { - "tinyxml2" - } - - files { - "xmltest.cpp" - } diff --git a/readme.md b/readme.md index 5a80191..5245ac4 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,7 @@ TinyXML-2 ========= -[![TravisCI Status](https://travis-ci.org/leethomason/tinyxml2.svg?branch=master)](https://travis-ci.org/leethomason/tinyxml2) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/leethomason/tinyxml2?branch=master&svg=true)](https://ci.appveyor.com/project/leethomason/tinyxml2) - -![C/C++ CI Unixish](https://github.com/leethomason/tinyxml2/workflows/C/C++%20CI%20Unixish/badge.svg) +![Build](https://github.com/leethomason/tinyxml2/actions/workflows/test.yml/badge.svg) ![TinyXML-2 Logo](http://www.grinninglizard.com/tinyxml2/TinyXML2_small.png) @@ -63,18 +61,15 @@ browsers or have more complete XML needs, TinyXML-2 is not the parser for you. TinyXML-1 vs. TinyXML-2 ----------------------- -TinyXML-2 is now the focus of all development, well tested, and your -best choice between the two APIs. At this point, unless you are maintaining -legacy code, you should choose TinyXML-2. +TinyXML-2 long been the focus of all development. It is well tested +and should be used instead of TinyXML-1. TinyXML-2 uses a similar API to TinyXML-1 and the same rich test cases. But the implementation of the parser is completely re-written to make it more appropriate for use in a game. It uses less memory, is faster, and uses far fewer memory allocations. -TinyXML-2 has no requirement or support for STL. By returning `const char*` -TinyXML-2 can be much more efficient with memory usage. (TinyXML-1 did support -and use STL, but consumed much more memory for the DOM representation.) +TinyXML-2 has no requirement or support for STL. Features -------- @@ -264,32 +259,14 @@ There are 2 files in TinyXML-2: And additionally a test file: * xmltest.cpp -Simply compile and run. There is a visual studio 2019 project included, a simple Makefile, -an Xcode project, a Code::Blocks project, a cmake CMakeLists.txt, and a meson.build are -included to help you. The top of tinyxml.h even has a simple g++ command line if you are -using Unix/Linux/BSD and don't want to use a build system. +Generally speaking, the intent is that you simply include the tinyxml2.cpp and +tinyxml2.h files in your project and build with your other source code. -Using as a Meson Subproject ---------------------------- +There is also a CMake build included. CMake is the general build for TinyXML-2. +Additional build systems are costly to maintain, and tend to bit-rot. -Create a wrap file such as: -```ini -[wrap-git] -url = https://github.com/leethomason/tinyxml2.git -revision = 8.0.1 # this can be any commit-ish (tag, sha) or the special value `head` -``` - -or, if you prefer to not use git - -```ini -[wrap-file] -directory = tinyxml2-8.0.1 # this is the name of the directory after de-compressing -source_url = https://github.com/leethomason/tinyxml2/archive/8.0.1.tar.gz -source_hash = sha256sum of compressed sources -``` - -in your project's `subprojects/` folder, and follow the meson documentation -for using fallbacks. +A Visual Studio project is included, but that is largely for developer convenience, +and is not intended to integrate well with other builds. Building TinyXML-2 - Using vcpkg -------------------------------- @@ -312,12 +289,6 @@ TinyXML-2 uses semantic versioning. http://semver.org/ Releases are now tagged i Note that the major version will (probably) change fairly rapidly. API changes are fairly common. -Documentation -------------- - -The documentation is built with Doxygen, using the 'dox' -configuration file. - License ------- diff --git a/setversion.py b/setversion.py index 31d124f..ad30369 100755 --- a/setversion.py +++ b/setversion.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Python program to set the version. ############################################## @@ -18,14 +19,14 @@ def fileProcess( name, lineFunction ): if not line: break output += lineFunction( line ) filestream.close() - + if not output: return # basic error checking - + print( "Writing file " + name ) filestream = open( name, "w" ); filestream.write( output ); filestream.close() - + def echoInput( line ): return line @@ -108,31 +109,19 @@ fileProcess( "dox", doxRule ) #### Write the CMakeLists.txt #### -def cmakeRule1( line ): +def cmakeRule( line ): - matchVersion = "set(GENERIC_LIB_VERSION" + matchVersion = "project(tinyxml2 VERSION" if line[0:len(matchVersion)] == matchVersion: print( "1)tinyxml2.h Major found" ) - return matchVersion + " \"" + major + "." + minor + "." + build + "\")" + "\n" + return matchVersion + " " + major + "." + minor + "." + build + ")\n" else: return line; -fileProcess( "CMakeLists.txt", cmakeRule1 ) +fileProcess( "CMakeLists.txt", cmakeRule ) -def cmakeRule2( line ): - - matchSoversion = "set(GENERIC_LIB_SOVERSION" - - if line[0:len(matchSoversion)] == matchSoversion: - print( "1)tinyxml2.h Major found" ) - return matchSoversion + " \"" + major + "\")" + "\n" - - else: - return line; - -fileProcess( "CMakeLists.txt", cmakeRule2 ) def mesonRule(line): match = re.search(r"(\s*version) : '(\d+.\d+.\d+)',", line) @@ -150,5 +139,3 @@ print( '3. Tag. git tag ' + versionStr ) print( ' OR git tag -a ' + versionStr + ' -m [tag message]' ) print( 'Remember to "git push" both code and tag. For the tag:' ) print( 'git push origin [tagname]') - - \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..bf3a61f --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.15) +project(tinyxml2-test) + +enable_testing() + +find_package(tinyxml2 REQUIRED) + +add_executable(xmltest ../xmltest.cpp) +target_link_libraries(xmltest PRIVATE tinyxml2::tinyxml2) + +add_test( + NAME xmltest + COMMAND xmltest + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.." +) + +set_tests_properties(xmltest + PROPERTIES + PASS_REGULAR_EXPRESSION ", Fail 0" + ENVIRONMENT "PATH=$") diff --git a/tinyxml2/test.vcxproj b/tinyxml2/test.vcxproj deleted file mode 100644 index df15660..0000000 --- a/tinyxml2/test.vcxproj +++ /dev/null @@ -1,352 +0,0 @@ - - - - - Debug-Dll - Win32 - - - Debug-Dll - x64 - - - Debug-Lib - Win32 - - - Debug-Lib - x64 - - - Release-Dll - Win32 - - - Release-Dll - x64 - - - Release-Lib - Win32 - - - Release-Lib - x64 - - - - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260} - test - 10.0 - - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Unicode - - - Unicode - true - - - Unicode - - - Unicode - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)$(Configuration)\ - - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)$(Configuration)\ - - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)$(Configuration)\ - - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)$(Configuration)\ - - - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - - - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - - Level4 - Disabled - - - true - - - - - Level4 - Disabled - - - true - - - - - Level4 - Disabled - TINYXML2_IMPORT;%(PreprocessorDefinitions) - - - true - Console - - - - - Level4 - Disabled - TINYXML2_IMPORT;%(PreprocessorDefinitions) - - - true - Console - - - - - Level4 - MaxSpeed - true - true - - - true - true - true - - - - - Level4 - MaxSpeed - true - true - - - true - true - true - - - - - Level4 - MaxSpeed - true - true - AnySuitable - Speed - true - true - true - TINYXML2_IMPORT;%(PreprocessorDefinitions) - - - false - true - true - Console - true - - - - - Level4 - MaxSpeed - true - true - AnySuitable - Speed - true - true - true - TINYXML2_IMPORT;%(PreprocessorDefinitions) - - - false - true - true - Console - true - - - - - Level4 - - - Console - - - - - Level4 - AnySuitable - true - Speed - true - true - true - - - false - Console - true - true - true - - - - - Level4 - - - Console - - - - - Level4 - AnySuitable - true - Speed - true - true - true - - - false - Console - true - true - true - - - - - - - - {d1c528b6-aa02-4d29-9d61-dc08e317a70d} - - - - - - \ No newline at end of file diff --git a/tinyxml2/test.vcxproj.filters b/tinyxml2/test.vcxproj.filters deleted file mode 100644 index 0a70dc6..0000000 --- a/tinyxml2/test.vcxproj.filters +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/tinyxml2/tinyxml2-cbp/README b/tinyxml2/tinyxml2-cbp/README deleted file mode 100644 index 828448e..0000000 --- a/tinyxml2/tinyxml2-cbp/README +++ /dev/null @@ -1,3 +0,0 @@ -The (default) Release configuration of this project builds a ready to use static library. -The Debug configuration of this project builds an executable console application that -executes all tests provided for tinyxml2 in the xmltest.cpp file. \ No newline at end of file diff --git a/tinyxml2/tinyxml2-cbp/tinyxml2-cbp.cbp b/tinyxml2/tinyxml2-cbp/tinyxml2-cbp.cbp deleted file mode 100644 index 915746f..0000000 --- a/tinyxml2/tinyxml2-cbp/tinyxml2-cbp.cbp +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - diff --git a/tinyxml2/tinyxml2.sln b/tinyxml2/tinyxml2.sln deleted file mode 100755 index 1c0c92f..0000000 --- a/tinyxml2/tinyxml2.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml2", "tinyxml2.vcxproj", "{D1C528B6-AA02-4D29-9D61-DC08E317A70D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcxproj", "{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug-Dll|Win32 = Debug-Dll|Win32 - Debug-Dll|x64 = Debug-Dll|x64 - Debug-Lib|Win32 = Debug-Lib|Win32 - Debug-Lib|x64 = Debug-Lib|x64 - Release-Dll|Win32 = Release-Dll|Win32 - Release-Dll|x64 = Release-Dll|x64 - Release-Lib|Win32 = Release-Lib|Win32 - Release-Lib|x64 = Release-Lib|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|Win32.ActiveCfg = Debug-Dll|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|Win32.Build.0 = Debug-Dll|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|x64.ActiveCfg = Debug-Dll|x64 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|x64.Build.0 = Debug-Dll|x64 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|Win32.ActiveCfg = Debug-Lib|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|Win32.Build.0 = Debug-Lib|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|x64.ActiveCfg = Debug-Lib|x64 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|x64.Build.0 = Debug-Lib|x64 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|Win32.ActiveCfg = Release-Dll|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|Win32.Build.0 = Release-Dll|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|x64.ActiveCfg = Release-Dll|x64 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|x64.Build.0 = Release-Dll|x64 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|Win32.ActiveCfg = Release-Lib|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|Win32.Build.0 = Release-Lib|Win32 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|x64.ActiveCfg = Release-Lib|x64 - {D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|x64.Build.0 = Release-Lib|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|Win32.ActiveCfg = Debug-Dll|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|Win32.Build.0 = Debug-Dll|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|x64.ActiveCfg = Debug-Dll|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|x64.Build.0 = Debug-Dll|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|Win32.ActiveCfg = Debug-Lib|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|Win32.Build.0 = Debug-Lib|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|x64.ActiveCfg = Debug-Lib|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|x64.Build.0 = Debug-Lib|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|Win32.ActiveCfg = Release-Dll|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|Win32.Build.0 = Release-Dll|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|x64.ActiveCfg = Release-Dll|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|x64.Build.0 = Release-Dll|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|Win32.ActiveCfg = Release-Lib|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|Win32.Build.0 = Release-Lib|Win32 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|x64.ActiveCfg = Release-Lib|x64 - {E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|x64.Build.0 = Release-Lib|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/tinyxml2/tinyxml2.vcxproj b/tinyxml2/tinyxml2.vcxproj deleted file mode 100755 index 4e34f97..0000000 --- a/tinyxml2/tinyxml2.vcxproj +++ /dev/null @@ -1,393 +0,0 @@ - - - - - Debug-Dll - Win32 - - - Debug-Dll - x64 - - - Debug-Lib - Win32 - - - Debug-Lib - x64 - - - Release-Dll - Win32 - - - Release-Dll - x64 - - - Release-Lib - Win32 - - - Release-Lib - x64 - - - - {D1C528B6-AA02-4D29-9D61-DC08E317A70D} - Win32Proj - tinyxml2 - 10.0 - - - - StaticLibrary - true - Unicode - v142 - - - DynamicLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - DynamicLibrary - true - Unicode - v142 - - - StaticLibrary - false - true - Unicode - v142 - - - DynamicLibrary - false - true - Unicode - v142 - - - StaticLibrary - false - true - Unicode - v142 - - - DynamicLibrary - false - true - Unicode - v142 - - - StaticLibrary - Unicode - - - StaticLibrary - true - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - true - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - true - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - false - $(SolutionDir)$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - false - $(SolutionDir)$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - false - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - false - $(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\ - $(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\ - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - - - - - - - Level4 - Disabled - WIN32;TINYXML2_EXPORT;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - NotSet - true - - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - - - - - - - Level4 - Disabled - WIN32;TINYXML2_EXPORT;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - NotSet - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - AnySuitable - Speed - true - true - true - false - - - Console - true - true - true - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;TINYXML2_EXPORT;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - AnySuitable - Speed - true - true - true - false - - - NotSet - true - true - true - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - AnySuitable - Speed - true - true - true - false - - - Console - true - true - true - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;TINYXML2_EXPORT;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - AnySuitable - Speed - true - true - true - false - - - NotSet - true - true - true - true - - - - - true - - - - - true - - - AnySuitable - - - true - - - Speed - - - true - - - true - true - false - - - - - true - - - - - true - - - AnySuitable - - - true - - - Speed - - - true - - - true - true - false - - - - - - - - - - - - \ No newline at end of file diff --git a/tinyxml2/tinyxml2.vcxproj.filters b/tinyxml2/tinyxml2.vcxproj.filters deleted file mode 100755 index e19968a..0000000 --- a/tinyxml2/tinyxml2.vcxproj.filters +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tinyxml2/tinyxml2.xcodeproj/project.pbxproj b/tinyxml2/tinyxml2.xcodeproj/project.pbxproj deleted file mode 100644 index c8393bb..0000000 --- a/tinyxml2/tinyxml2.xcodeproj/project.pbxproj +++ /dev/null @@ -1,211 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 037AE8A5151E692700E0F29F /* xmltest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 037AE8A3151E692700E0F29F /* xmltest.cpp */; }; - 03F28B53152E9B1B00D4CD90 /* tinyxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F28B4A152E9B1B00D4CD90 /* tinyxml2.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 037AE86D151E685F00E0F29F /* xmltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = xmltest; sourceTree = BUILT_PRODUCTS_DIR; }; - 037AE8A3151E692700E0F29F /* xmltest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmltest.cpp; path = ../xmltest.cpp; sourceTree = SOURCE_ROOT; }; - 03F28B4A152E9B1B00D4CD90 /* tinyxml2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxml2.cpp; sourceTree = ""; }; - 03F28B4B152E9B1B00D4CD90 /* tinyxml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyxml2.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 037AE86B151E685F00E0F29F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 037AE056151CCC5200E0F29F = { - isa = PBXGroup; - children = ( - 037AE069151CCC7000E0F29F /* Classes */, - 03F28B60152E9B4C00D4CD90 /* Libraries */, - 037AE06F151CCCB900E0F29F /* Products */, - ); - sourceTree = ""; - }; - 037AE069151CCC7000E0F29F /* Classes */ = { - isa = PBXGroup; - children = ( - 037AE8A3151E692700E0F29F /* xmltest.cpp */, - ); - name = Classes; - sourceTree = ""; - }; - 037AE06F151CCCB900E0F29F /* Products */ = { - isa = PBXGroup; - children = ( - 037AE86D151E685F00E0F29F /* xmltest */, - ); - name = Products; - sourceTree = ""; - }; - 03F28AD7152E9B1B00D4CD90 /* tinyxml2 */ = { - isa = PBXGroup; - children = ( - 03F28B4A152E9B1B00D4CD90 /* tinyxml2.cpp */, - 03F28B4B152E9B1B00D4CD90 /* tinyxml2.h */, - ); - name = tinyxml2; - path = ..; - sourceTree = SOURCE_ROOT; - }; - 03F28B60152E9B4C00D4CD90 /* Libraries */ = { - isa = PBXGroup; - children = ( - 03F28AD7152E9B1B00D4CD90 /* tinyxml2 */, - ); - name = Libraries; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 037AE86C151E685F00E0F29F /* xmltest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 037AE873151E687E00E0F29F /* Build configuration list for PBXNativeTarget "xmltest" */; - buildPhases = ( - 037AE86A151E685F00E0F29F /* Sources */, - 037AE86B151E685F00E0F29F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = xmltest; - productName = tinyxml2; - productReference = 037AE86D151E685F00E0F29F /* xmltest */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 037AE058151CCC5200E0F29F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - }; - buildConfigurationList = 037AE05B151CCC5200E0F29F /* Build configuration list for PBXProject "tinyxml2" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 037AE056151CCC5200E0F29F; - productRefGroup = 037AE06F151CCCB900E0F29F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 037AE86C151E685F00E0F29F /* xmltest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 037AE86A151E685F00E0F29F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 037AE8A5151E692700E0F29F /* xmltest.cpp in Sources */, - 03F28B53152E9B1B00D4CD90 /* tinyxml2.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 037AE059151CCC5200E0F29F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(SYMROOT)/Debug"; - COPY_PHASE_STRIP = NO; - "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = TINYXML2_DEBUG; - ONLY_ACTIVE_ARCH = YES; - SYMROOT = build; - }; - name = Debug; - }; - 037AE05A151CCC5200E0F29F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - }; - name = Release; - }; - 037AE86F151E686000E0F29F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = ..; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; - MACOSX_DEPLOYMENT_TARGET = ""; - PREBINDING = NO; - PRODUCT_NAME = xmltest; - }; - name = Debug; - }; - 037AE870151E686000E0F29F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = ..; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - INSTALL_PATH = /usr/local/bin; - MACOSX_DEPLOYMENT_TARGET = ""; - PREBINDING = NO; - PRODUCT_NAME = tinyxml2; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 037AE05B151CCC5200E0F29F /* Build configuration list for PBXProject "tinyxml2" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 037AE059151CCC5200E0F29F /* Debug */, - 037AE05A151CCC5200E0F29F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 037AE873151E687E00E0F29F /* Build configuration list for PBXNativeTarget "xmltest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 037AE86F151E686000E0F29F /* Debug */, - 037AE870151E686000E0F29F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 037AE058151CCC5200E0F29F /* Project object */; -} diff --git a/vs/tinyxml2.sln b/vs/tinyxml2.sln new file mode 100644 index 0000000..be0c85a --- /dev/null +++ b/vs/tinyxml2.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31229.75 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml2", "tinyxml2.vcxproj", "{7C72653A-E6F8-4584-B553-DE3A0AEE4356}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x64.ActiveCfg = Debug|x64 + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x64.Build.0 = Debug|x64 + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x86.ActiveCfg = Debug|Win32 + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x86.Build.0 = Debug|Win32 + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x64.ActiveCfg = Release|x64 + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x64.Build.0 = Release|x64 + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x86.ActiveCfg = Release|Win32 + {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8F57874D-F373-476E-93F5-EB09D74866E8} + EndGlobalSection +EndGlobal diff --git a/vs/tinyxml2.vcxproj b/vs/tinyxml2.vcxproj new file mode 100644 index 0000000..be2a81a --- /dev/null +++ b/vs/tinyxml2.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {7c72653a-e6f8-4584-b553-de3a0aee4356} + tinyxml2 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs/tinyxml2.vcxproj.filters b/vs/tinyxml2.vcxproj.filters new file mode 100644 index 0000000..b729bf8 --- /dev/null +++ b/vs/tinyxml2.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + + + Source Files + + + \ No newline at end of file