From 524a1414fc395fdc60951d63f4a66683309fd630 Mon Sep 17 00:00:00 2001 From: Francisco Dias Date: Mon, 17 Dec 2018 11:13:02 -0200 Subject: TinyXml Linkage error fixed --- ports/tinyxml/0002_export_tinyxml.patch | 26 ++++++++++++++++++++++++++ ports/tinyxml/CMakeLists.txt | 8 +++++++- ports/tinyxml/portfile.cmake | 1 + 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ports/tinyxml/0002_export_tinyxml.patch (limited to 'ports/tinyxml') diff --git a/ports/tinyxml/0002_export_tinyxml.patch b/ports/tinyxml/0002_export_tinyxml.patch new file mode 100644 index 000000000..7f09a6ec9 --- /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 9b55aa717..21776c156 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 54d462bb4..dcd1fcc08 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( -- cgit v1.2.3 From ccff8ab94ed1294d306d977b0bf25e8e9140a0d8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 18 Dec 2018 12:46:19 -0800 Subject: [tinyxml] Modernize and bump control version --- ports/tinyxml/CONTROL | 2 +- ports/tinyxml/portfile.cmake | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'ports/tinyxml') diff --git a/ports/tinyxml/CONTROL b/ports/tinyxml/CONTROL index 3d97a3312..f1075e38e 100644 --- a/ports/tinyxml/CONTROL +++ b/ports/tinyxml/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml -Version: 2.6.2-2 +Version: 2.6.2-3 Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs. diff --git a/ports/tinyxml/portfile.cmake b/ports/tinyxml/portfile.cmake index dcd1fcc08..1d4e6131b 100644 --- a/ports/tinyxml/portfile.cmake +++ b/ports/tinyxml/portfile.cmake @@ -1,23 +1,22 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml) - vcpkg_download_distfile(ARCHIVE URLS "https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz" FILENAME "tinyxml_2_6_2.tar.gz" SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56 ) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 2.6.2 PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_export_tinyxml.patch + 0001_use_stl.patch + 0002_export_tinyxml.patch ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3