Skip to content

Instantly share code, notes, and snippets.

@scpeters
Created August 24, 2013 00:02
Show Gist options
  • Save scpeters/6325123 to your computer and use it in GitHub Desktop.
Save scpeters/6325123 to your computer and use it in GitHub Desktop.
This is a patch that lets you use cmake to build and install tinyxml.
diff -Nu tinyxml-2.6.2/CMakeLists.txt tinyxml-2.6.2.patch/CMakeLists.txt
--- tinyxml-2.6.2/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800
+++ tinyxml-2.6.2.patch/CMakeLists.txt 2013-08-23 16:52:57.311170051 -0700
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 2.4.6)
+add_definitions(-DTIXML_USE_STL)
+add_library(tinyxml SHARED tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp)
+set_target_properties(tinyxml PROPERTIES
+ INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
+
+install(TARGETS tinyxml
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION lib)
+install(FILES tinyxml.h
+ DESTINATION include)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment