[glibmm] Reintroduce CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS (#6550)

(partially reverts change discussed in #5937)
This commit is contained in:
Norbert Nemec 2019-05-16 21:56:34 +02:00
parent 36babc4c93
commit aaae648571
3 changed files with 13 additions and 5 deletions

View File

@ -40,6 +40,11 @@ if(APPLE)
link_libraries(${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${FOUNDATION_LIBRARY})
endif()
# A hacky solution for building Windows DLLs from sources ported from Linux.
# The cleaner approach would be to manually add __declspec(dllexport) to all public symbols in the header files or
# construct a .def file.
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
if(BUILD_SHARED_LIBS)
add_definitions(-DGLIBMM_DLL -DGIOMM_DLL)
else()

View File

@ -1,4 +1,4 @@
Source: glibmm
Version: 2.52.1-8
Description: This is glibmm, a C++ API for parts of glib that are useful for C++. See http://www.gtkmm.org.
Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp
Source: glibmm
Version: 2.52.1-9
Description: This is glibmm, a C++ API for parts of glib that are useful for C++. See http://www.gtkmm.org.
Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp

View File

@ -5,7 +5,10 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
# This library itself would would as static library, but it is used by gtkmm, atkmm & pangomm which are all set to ONLY_DYNAMIC LIBRARY
# Having multiple dynamic libaries linking the same static library causes multiple copies of its static data to be present in the executable
# leading to confusing and hard-to-debug runtime effects.
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glibmm-2.52.1)
vcpkg_download_distfile(ARCHIVE