diff options
Diffstat (limited to 'dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch')
-rw-r--r-- | dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch b/dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch new file mode 100644 index 000000000000..95e849fdc8ff --- /dev/null +++ b/dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch @@ -0,0 +1,30 @@ +--- tinyxml2-4.0.1/CMakeLists.txt ++++ tinyxml2-4.0.1/CMakeLists.txt +@@ -100,15 +100,18 @@ + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+
+-add_executable(xmltest xmltest.cpp)
+-if(BUILD_SHARED_LIBS)
+- add_dependencies(xmltest tinyxml2)
+- add_dependencies(xmltest ${TARGET_DATA_COPY})
+- target_link_libraries(xmltest tinyxml2)
+-else(BUILD_STATIC_LIBS)
+- add_dependencies(xmltest tinyxml2_static)
+- add_dependencies(xmltest ${TARGET_DATA_COPY})
+- target_link_libraries(xmltest tinyxml2_static)
++set(BUILD_TEST OFF CACHE BOOL "Set to ON to build tests")
++if(BUILD_TEST)
++ add_executable(xmltest xmltest.cpp)
++ if(BUILD_SHARED_LIBS)
++ add_dependencies(xmltest tinyxml2)
++ add_dependencies(xmltest ${TARGET_DATA_COPY})
++ target_link_libraries(xmltest tinyxml2)
++ else(BUILD_STATIC_LIBS)
++ add_dependencies(xmltest tinyxml2_static)
++ add_dependencies(xmltest ${TARGET_DATA_COPY})
++ target_link_libraries(xmltest tinyxml2_static)
++ endif()
+ endif()
+ install(TARGETS DESTINATION ${CMAKE_INSTALL_BINDIR})
+
|