TinyXml Linkage error fixed

This commit is contained in:
Francisco Dias 2018-12-17 11:13:02 -02:00
parent e04b4ed5b5
commit 524a1414fc
3 changed files with 34 additions and 1 deletions

View File

@ -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 <string.h>
#include <assert.h>
+#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;
};

View File

@ -15,6 +15,11 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(tinyxml ${SOURCES}) add_library(tinyxml ${SOURCES})
target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL") target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL")
include(GenerateExportHeader)
generate_export_header(tinyxml)
target_include_directories(tinyxml PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
install( install(
TARGETS tinyxml TARGETS tinyxml
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
@ -22,4 +27,5 @@ install(
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
) )
install(FILES ${HEADERS} DESTINATION include) install(FILES ${HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/tinyxml_export.h DESTINATION include)

View File

@ -15,6 +15,7 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PATCHES PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch ${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch
${CMAKE_CURRENT_LIST_DIR}/0002_export_tinyxml.patch
) )
vcpkg_configure_cmake( vcpkg_configure_cmake(