aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/tinyxml/CMakeLists.txt
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/tinyxml/CMakeLists.txt
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/tinyxml/CMakeLists.txt')
-rw-r--r--vcpkg/ports/tinyxml/CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/vcpkg/ports/tinyxml/CMakeLists.txt b/vcpkg/ports/tinyxml/CMakeLists.txt
new file mode 100644
index 0000000..2004da4
--- /dev/null
+++ b/vcpkg/ports/tinyxml/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 3.4)
+project(tinyxml)
+
+set(HEADERS "tinyxml.h")
+
+set(SOURCES "tinyxml.cpp"
+ "tinyxmlerror.cpp"
+ "tinyxmlparser.cpp"
+)
+
+option(BUILD_SHARED_LIBS "Build shared libs" OFF)
+
+add_library(unofficial-tinyxml ${SOURCES})
+target_compile_definitions(unofficial-tinyxml PRIVATE "-DTIXML_USE_STL")
+set_target_properties(unofficial-tinyxml PROPERTIES OUTPUT_NAME tinyxml)
+
+include(GenerateExportHeader)
+generate_export_header(unofficial-tinyxml BASE_NAME tinyxml)
+
+target_include_directories(unofficial-tinyxml
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+ $<INSTALL_INTERFACE:include>
+)
+install(TARGETS unofficial-tinyxml
+ EXPORT tinyxml-export
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+)
+install(EXPORT tinyxml-export
+FILE
+ tinyxmlTargets.cmake
+NAMESPACE
+ unofficial-tinyxml::
+DESTINATION
+ share/tinyxml
+)
+install(FILES ${HEADERS}
+ ${CMAKE_CURRENT_BINARY_DIR}/tinyxml_export.h DESTINATION include)