diff --git a/ports/tinyxml/0002_export_tinyxml.patch b/ports/tinyxml/0002_export_tinyxml.patch new file mode 100644 index 0000000000..7f09a6ec94 --- /dev/null +++ b/ports/tinyxml/0002_export_tinyxml.patch @@ -0,0 +1,26 @@ +# User Francisco Dias +# Date 1545049386 7200 +# Mon Dec 17 10:23:06 2018 -0200 +Export tinyXML. + +diff --git a/tinyxml.h b/tinyxml.h +--- a/tinyxml.h ++++ b/tinyxml.h +@@ -38,6 +38,8 @@ + #include + #include + ++#include "tinyxml_export.h" ++ + // Help out windows: + #if defined( _DEBUG ) && !defined( DEBUG ) + #define DEBUG +@@ -414,7 +416,7 @@ + + }; + static Entity entity[ NUM_ENTITY ]; +- static bool condenseWhiteSpace; ++ static TINYXML_EXPORT bool condenseWhiteSpace; + }; + + diff --git a/ports/tinyxml/CMakeLists.txt b/ports/tinyxml/CMakeLists.txt index 9b55aa7170..21776c156b 100644 --- a/ports/tinyxml/CMakeLists.txt +++ b/ports/tinyxml/CMakeLists.txt @@ -15,6 +15,11 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) add_library(tinyxml ${SOURCES}) target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL") +include(GenerateExportHeader) +generate_export_header(tinyxml) + +target_include_directories(tinyxml PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + install( TARGETS tinyxml ARCHIVE DESTINATION lib @@ -22,4 +27,5 @@ install( RUNTIME DESTINATION bin ) -install(FILES ${HEADERS} DESTINATION include) +install(FILES ${HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/tinyxml_export.h DESTINATION include) diff --git a/ports/tinyxml/portfile.cmake b/ports/tinyxml/portfile.cmake index 54d462bb4a..dcd1fcc08c 100644 --- a/ports/tinyxml/portfile.cmake +++ b/ports/tinyxml/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch + ${CMAKE_CURRENT_LIST_DIR}/0002_export_tinyxml.patch ) vcpkg_configure_cmake(