aboutsummaryrefslogtreecommitdiff
path: root/ports/glib
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-03-05 12:07:43 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-03-05 12:07:43 -0800
commit26fabaf8803cbf4ce36b98c542e2224277e56c98 (patch)
treeb4d0077e41c2ebd4a471f5b559c659ea6245ae12 /ports/glib
parent6675327606b46df3691314ce8b29095ded628483 (diff)
downloadvcpkg-26fabaf8803cbf4ce36b98c542e2224277e56c98.tar.gz
vcpkg-26fabaf8803cbf4ce36b98c542e2224277e56c98.zip
[glib][atk] Disable static builds, fix generation to happen outside the source directory
Diffstat (limited to 'ports/glib')
-rw-r--r--ports/glib/CMakeLists.txt5
-rw-r--r--ports/glib/CONTROL2
-rw-r--r--ports/glib/portfile.cmake7
3 files changed, 8 insertions, 6 deletions
diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt
index 40763e8cd..25218a7f8 100644
--- a/ports/glib/CMakeLists.txt
+++ b/ports/glib/CMakeLists.txt
@@ -27,6 +27,8 @@ find_library(PCRE_LIBRARY pcre${PCRE_SUFFIX})
# libiconv
find_path(ICONV_INCLUDE_DIR iconv.h)
find_library(ICONV_LIBRARY NAMES iconv libiconv)
+# libiconv
+find_library(CHARSET_LIBRARY NAMES charset libcharset)
# libffi
find_path(FFI_INCLUDE_DIR ffi.h)
find_library(FFI_LIBRARY NAMES ffi libffi)
@@ -64,7 +66,7 @@ extract_vcproj_sources(win32/vs14/glib.vcxproj GLIB_SOURCES)
list(APPEND GLIB_SOURCES glib/libcharset/localcharset.c) # modified internal version with prefixed symbols
add_library(glib ${GLIB_SOURCES})
target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE ${GLIB_EXPORT_MACRO} GLIB_COMPILATION G_LOG_DOMAIN="GLib" LIBDIR)
-target_link_libraries(glib ws2_32 winmm ${PCRE_LIBRARY} ${ICONV_LIBRARY} ${LIBINTL_LIBRARY})
+target_link_libraries(glib ws2_32 winmm ${PCRE_LIBRARY} ${ICONV_LIBRARY} ${CHARSET_LIBRARY} ${LIBINTL_LIBRARY})
target_include_directories(glib PRIVATE ${PCRE_INCLUDE_DIR} ${ICONV_INCLUDE_DIR})
target_include_directories(glib PUBLIC ${LIBINTL_INCLUDE_DIR})
list(APPEND GLIB_TARGETS glib)
@@ -161,5 +163,6 @@ message(STATUS "Link-time dependencies:")
message(STATUS " " ${ZLIB_LIBRARIES})
message(STATUS " " ${PCRE_LIBRARY})
message(STATUS " " ${ICONV_LIBRARY})
+message(STATUS " " ${CHARSET_LIBRARY})
message(STATUS " " ${FFI_LIBRARY})
message(STATUS " " ${LIBINTL_LIBRARY})
diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL
index a4e467bbc..4f06e4e2e 100644
--- a/ports/glib/CONTROL
+++ b/ports/glib/CONTROL
@@ -1,4 +1,4 @@
Source: glib
-Version: 2.52.3-1
+Version: 2.52.3-2
Description: Portable, general-purpose utility library.
Build-Depends: zlib, pcre, libffi, gettext, libiconv
diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake
index 9482b4386..9618b6686 100644
--- a/ports/glib/portfile.cmake
+++ b/ports/glib/portfile.cmake
@@ -1,12 +1,11 @@
# Glib uses winapi functions not available in WindowsStore
-if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
endif()
# Glib relies on DllMain
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(STATUS "Warning: Static building not supported. Building dynamic.")
- set(VCPKG_LIBRARY_LINKAGE dynamic)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_CRT_LINKAGE STREQUAL "static")
+ message(FATAL_ERROR "Glib only supports dynamic library and crt linkage")
endif()
include(vcpkg_common_functions)