mirror of https://github.com/AxioDL/tinyxml2.git
Merge branch 'master' into int64support
This commit is contained in:
commit
536a4cde37
|
@ -72,6 +72,10 @@ set_target_properties(tinyxml2 PROPERTIES
|
|||
VERSION "${GENERIC_LIB_VERSION}"
|
||||
SOVERSION "${GENERIC_LIB_SOVERSION}")
|
||||
|
||||
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
|
||||
target_include_directories(tinyxml2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/.")
|
||||
endif()
|
||||
|
||||
install(TARGETS tinyxml2
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
@ -86,6 +90,10 @@ set_target_properties(tinyxml2_static PROPERTIES
|
|||
SOVERSION "${GENERIC_LIB_SOVERSION}")
|
||||
set_target_properties( tinyxml2_static PROPERTIES OUTPUT_NAME tinyxml2 )
|
||||
|
||||
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
|
||||
target_include_directories(tinyxml2_static INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/.")
|
||||
endif()
|
||||
|
||||
install(TARGETS tinyxml2_static
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
|
8
Makefile
8
Makefile
|
@ -2,17 +2,17 @@ all: xmltest staticlib
|
|||
|
||||
rebuild: clean all
|
||||
|
||||
xmltest: xmltest.cpp tinyxml2.a
|
||||
xmltest: xmltest.cpp libtinyxml2.a
|
||||
|
||||
clean:
|
||||
$(RM) *.o xmltest tinyxml2.a
|
||||
$(RM) *.o xmltest libtinyxml2.a
|
||||
|
||||
test: clean xmltest
|
||||
./xmltest
|
||||
|
||||
staticlib: tinyxml2.a
|
||||
staticlib: libtinyxml2.a
|
||||
|
||||
tinyxml2.a: tinyxml2.o
|
||||
libtinyxml2.a: tinyxml2.o
|
||||
$(AR) $(ARFLAGS)s $@ $^
|
||||
|
||||
tinyxml2.o: tinyxml2.cpp tinyxml2.h
|
||||
|
|
|
@ -264,7 +264,7 @@ There are 2 files in TinyXML-2:
|
|||
And additionally a test file:
|
||||
* xmltest.cpp
|
||||
|
||||
Simply compile and run. There is a visual studio 2010 project included, a simple Makefile,
|
||||
Simply compile and run. There is a visual studio 2015 project included, a simple Makefile,
|
||||
an Xcode project, a Code::Blocks project, and a cmake CMakeLists.txt included to help you.
|
||||
The top of tinyxml.h even has a simple g++ command line if you are are *nix and don't want
|
||||
to use a build system.
|
||||
|
|
10
tinyxml2.cpp
10
tinyxml2.cpp
|
@ -1987,10 +1987,12 @@ struct LongFitsIntoSizeTMinusOne {
|
|||
};
|
||||
|
||||
template <>
|
||||
bool LongFitsIntoSizeTMinusOne<false>::Fits( unsigned long /*value*/ )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
struct LongFitsIntoSizeTMinusOne<false> {
|
||||
static bool Fits( unsigned long )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
XMLError XMLDocument::LoadFile( FILE* fp )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue