diff options
| author | Norbert Nemec <Norbert@Nemec-online.de> | 2019-05-16 21:56:34 +0200 |
|---|---|---|
| committer | Norbert Nemec <Norbert@Nemec-online.de> | 2019-05-25 18:43:57 +0200 |
| commit | aaae648571dac364d407929a2df6746118081ecb (patch) | |
| tree | 7340822349bb88fbfbcb8d4447fabd21966e9ef4 | |
| parent | 36babc4c9318f10424d45f712e7ecf24a1b9392d (diff) | |
| download | vcpkg-aaae648571dac364d407929a2df6746118081ecb.tar.gz vcpkg-aaae648571dac364d407929a2df6746118081ecb.zip | |
[glibmm] Reintroduce CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS (#6550)
(partially reverts change discussed in #5937)
| -rw-r--r-- | ports/glibmm/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | ports/glibmm/CONTROL | 8 | ||||
| -rw-r--r-- | ports/glibmm/portfile.cmake | 5 |
3 files changed, 13 insertions, 5 deletions
diff --git a/ports/glibmm/CMakeLists.txt b/ports/glibmm/CMakeLists.txt index 8e7f8f0fe..389ae8dfb 100644 --- a/ports/glibmm/CMakeLists.txt +++ b/ports/glibmm/CMakeLists.txt @@ -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()
diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL index efef52d3f..ead483418 100644 --- a/ports/glibmm/CONTROL +++ b/ports/glibmm/CONTROL @@ -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 diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake index 58378907f..ac5be799f 100644 --- a/ports/glibmm/portfile.cmake +++ b/ports/glibmm/portfile.cmake @@ -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 |
