Merge branch 'master' into int64support

This commit is contained in:
Lee Thomason 2016-07-17 21:37:39 -07:00
commit 536a4cde37
4 changed files with 20 additions and 10 deletions

View File

@ -72,6 +72,10 @@ set_target_properties(tinyxml2 PROPERTIES
VERSION "${GENERIC_LIB_VERSION}" VERSION "${GENERIC_LIB_VERSION}"
SOVERSION "${GENERIC_LIB_SOVERSION}") 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 install(TARGETS tinyxml2
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@ -86,6 +90,10 @@ set_target_properties(tinyxml2_static PROPERTIES
SOVERSION "${GENERIC_LIB_SOVERSION}") SOVERSION "${GENERIC_LIB_SOVERSION}")
set_target_properties( tinyxml2_static PROPERTIES OUTPUT_NAME tinyxml2 ) 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 install(TARGETS tinyxml2_static
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

View File

@ -2,17 +2,17 @@ all: xmltest staticlib
rebuild: clean all rebuild: clean all
xmltest: xmltest.cpp tinyxml2.a xmltest: xmltest.cpp libtinyxml2.a
clean: clean:
$(RM) *.o xmltest tinyxml2.a $(RM) *.o xmltest libtinyxml2.a
test: clean xmltest test: clean xmltest
./xmltest ./xmltest
staticlib: tinyxml2.a staticlib: libtinyxml2.a
tinyxml2.a: tinyxml2.o libtinyxml2.a: tinyxml2.o
$(AR) $(ARFLAGS)s $@ $^ $(AR) $(ARFLAGS)s $@ $^
tinyxml2.o: tinyxml2.cpp tinyxml2.h tinyxml2.o: tinyxml2.cpp tinyxml2.h

View File

@ -264,7 +264,7 @@ There are 2 files in TinyXML-2:
And additionally a test file: And additionally a test file:
* xmltest.cpp * 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. 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 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. to use a build system.

View File

@ -1987,10 +1987,12 @@ struct LongFitsIntoSizeTMinusOne {
}; };
template <> template <>
bool LongFitsIntoSizeTMinusOne<false>::Fits( unsigned long /*value*/ ) struct LongFitsIntoSizeTMinusOne<false> {
{ static bool Fits( unsigned long )
{
return true; return true;
} }
};
XMLError XMLDocument::LoadFile( FILE* fp ) XMLError XMLDocument::LoadFile( FILE* fp )
{ {