mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 23:48:59 +08:00
Merge pull request #6621 from NNemec/glibmm
[glibmm] fix #6550 by partially reverting #5937 (+minor correction in glibmmconfig.h)
This commit is contained in:
commit
97d6a9be6b
@ -40,9 +40,14 @@ if(APPLE)
|
||||
link_libraries(${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${FOUNDATION_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_definitions(-DGLIBMM_DLL -DGIOMM_DLL)
|
||||
else()
|
||||
# Activate workaround for exporting all symbols from Windows DLLs to mimic the
|
||||
# behavior on Linux, where dynamic libraries always export all symbols.
|
||||
# The same approach was already used by the upstream MSVC build (see MSVC_NMake/gendef/gendef.cc)
|
||||
if (WIN32)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
add_definitions(-DGLIBMM_STATIC_LIB -DGIOMM_STATIC_LIB)
|
||||
endif()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: glibmm
|
||||
Version: 2.52.1-8
|
||||
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
|
||||
|
43
ports/glibmm/fix-define-glibmmconfig.patch
Normal file
43
ports/glibmm/fix-define-glibmmconfig.patch
Normal file
@ -0,0 +1,43 @@
|
||||
diff --git a/MSVC_Net2013/glibmm/glibmmconfig.h b/MSVC_Net2013/glibmm/glibmmconfig.h
|
||||
index 61bb83e..7dbe809 100644
|
||||
--- a/MSVC_Net2013/glibmm/glibmmconfig.h
|
||||
+++ b/MSVC_Net2013/glibmm/glibmmconfig.h
|
||||
@@ -7,12 +7,17 @@
|
||||
# if defined(_MSC_VER)
|
||||
# define GLIBMM_MSC 1
|
||||
# define GLIBMM_WIN32 1
|
||||
-# define GLIBMM_DLL 1
|
||||
+# if !defined(GLIBMM_STATIC_LIB)
|
||||
+# define GLIBMM_DLL 1
|
||||
+# endif
|
||||
# elif defined(__CYGWIN__)
|
||||
# define GLIBMM_CONFIGURE 1
|
||||
# elif defined(__MINGW32__)
|
||||
# define GLIBMM_WIN32 1
|
||||
# define GLIBMM_CONFIGURE 1
|
||||
+# if !defined(GLIBMM_STATIC_LIB)
|
||||
+# define GLIBMM_DLL 1
|
||||
+# endif
|
||||
# else
|
||||
/* AIX clR compiler complains about this even though it doesn't get this far */
|
||||
# error "Unknown architecture (send me gcc --dumpspecs or equiv)"
|
||||
@@ -108,6 +113,7 @@
|
||||
# define GLIBMM_HAVE_WIDE_STREAM 1
|
||||
# define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1
|
||||
# define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1
|
||||
+# define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS 1
|
||||
# define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1
|
||||
# define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1
|
||||
# define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1
|
||||
@@ -140,11 +146,6 @@
|
||||
* it to be defined. Remove after grace period. */
|
||||
#define GLIBMM_USING_STD(Symbol)
|
||||
|
||||
-/* Enable DLL-specific stuff only when not building a static library */
|
||||
-#if !defined(__CYGWIN__) && defined(__MINGW32__) && !defined(GLIBMM_STATIC_LIB)
|
||||
-# define GLIBMM_DLL 1
|
||||
-#endif
|
||||
-
|
||||
#ifdef GLIBMM_DLL
|
||||
# if defined(GLIBMM_BUILD) && defined(_WINDLL)
|
||||
/* Do not dllexport as it is handled by gendef on MSVC */
|
@ -1,12 +1,10 @@
|
||||
# Glib uses winapi functions not available in WindowsStore, so glibmm also
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
# Glib uses winapi functions not available in WindowsStore
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
|
||||
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glibmm-2.52.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.52/glibmm-2.52.1.tar.xz"
|
||||
@ -17,7 +15,9 @@ vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/glibmm-api-variant.patch
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/glibmm-api-variant.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-define-glibmmconfig.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
Loading…
Reference in New Issue
Block a user