aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-09-17 06:10:11 +0800
committerCurtis J Bezault <curtbezault@gmail.com>2019-09-16 15:10:11 -0700
commit741106fa23dc027c9bd1584f1c92d5f53bea7234 (patch)
treef05fb07c9185babc5aa6f27ee080efbac8437deb
parentd7e0ee44a34a9cde414aa30cc6b0978747b80fd4 (diff)
downloadvcpkg-741106fa23dc027c9bd1584f1c92d5f53bea7234.tar.gz
vcpkg-741106fa23dc027c9bd1584f1c92d5f53bea7234.zip
[glib]Fix missing dependency selinux. (#7988)
* [glib]Fix missing dependency selinux. * [glib]Improve warning message. * [sdl1]Set selinux to a feature. * Update portfile.cmake
-rw-r--r--ports/glib/CMakeLists.txt6
-rw-r--r--ports/glib/CONTROL3
-rw-r--r--ports/glib/portfile.cmake10
3 files changed, 18 insertions, 1 deletions
diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt
index 275dcd0af..6fe7847cf 100644
--- a/ports/glib/CMakeLists.txt
+++ b/ports/glib/CMakeLists.txt
@@ -253,8 +253,14 @@ if(WIN32)
target_link_libraries(gio PRIVATE ws2_32 shlwapi dnsapi iphlpapi advapi32 shell32)
elseif(APPLE)
target_link_libraries(gio PRIVATE xdgmime kqueue)
+ if (HAVE_SELINUX)
+ target_link_libraries(gio PRIVATE selinux)
+ endif()
else()
target_link_libraries(gio PRIVATE xdgmime inotify)
+ if (HAVE_SELINUX)
+ target_link_libraries(gio PRIVATE selinux)
+ endif()
endif()
list(APPEND GLIB_TARGETS gio)
diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL
index 1bb22c6df..b2293bc33 100644
--- a/ports/glib/CONTROL
+++ b/ports/glib/CONTROL
@@ -3,3 +3,6 @@ Version: 2.52.3-14-3
Homepage: https://developer.gnome.org/glib/
Description: Portable, general-purpose utility library.
Build-Depends: zlib, pcre, libffi, gettext, libiconv
+
+Feature: selinux
+Description: Build with selinux support. \ No newline at end of file
diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake
index 2dc9aee13..41c3c5017 100644
--- a/ports/glib/portfile.cmake
+++ b/ports/glib/portfile.cmake
@@ -32,10 +32,18 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre)
file(WRITE ${SOURCE_PATH}/glib/pcre/Makefile.in)
file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c)
+if (selinux IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS AND NOT EXISTS "/usr/include/selinux")
+ message("Selinux was not found in its typical system location. Your build may fail. You can install Selinux with \"apt-get install selinux\".")
+endif()
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ selinux HAVE_SELINUX
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS
+ OPTIONS ${FEATURE_OPTIONS}
-DGLIB_VERSION=${GLIB_VERSION}
OPTIONS_DEBUG
-DGLIB_SKIP_HEADERS=ON