vcpkg/ports/pixman/portfile.cmake
Alexander Neumann dc9d737351
[pixman] add missing include and fix clang-cl build (#26186)
* pixman: add missing include and fix clang-cl builds

* v db

* use correct <> isntead of ""

* v db

* make the patch depend on _MSC_VER

* v db

* fix bug in vcpkg_configure_meson not linking WindowsApp.lib
fix another bug that system=windowsstore which meson doesn recognize

* bump port version

* v db
2022-08-17 12:36:12 -07:00

62 lines
2.0 KiB
CMake

if(VCPKG_TARGET_IS_UWP)
list(APPEND OPTIONS
-Dmmx=disabled
-Dsse2=disabled
-Dssse3=disabled)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(VCPKG_CXX_FLAGS "/arch:SSE2 ${VCPKG_CXX_FLAGS}")
set(VCPKG_C_FLAGS "/arch:SSE2 ${VCPKG_C_FLAGS}")
list(APPEND OPTIONS
-Dmmx=enabled
-Dsse2=enabled
-Dssse3=enabled)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
#x64 in general has all those intrinsics. (except for UWP for some reason)
list(APPEND OPTIONS
-Dmmx=enabled
-Dsse2=enabled
-Dssse3=enabled)
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
list(APPEND OPTIONS
#-Darm-simd=enabled does not work with arm64-windows
-Dmmx=disabled
-Dsse2=disabled
-Dssse3=disabled)
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "mips")
list(APPEND OPTIONS
-Dmmx=disabled
-Dsse2=disabled
-Dssse3=disabled)
endif()
set(PIXMAN_VERSION 0.40.0)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz"
FILENAME "pixman-${PIXMAN_VERSION}.tar.gz"
SHA512 063776e132f5d59a6d3f94497da41d6fc1c7dca0d269149c78247f0e0d7f520a25208d908cf5e421d1564889a91da44267b12d61c0bd7934cd54261729a7de5f
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${PIXMAN_VERSION}
PATCHES
remove_test_demos.patch
no-host-cpu-checks.patch
fix_clang-cl.patch
missing_intrin_include.patch
)
# Meson install wrongly pkgconfig file!
vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${OPTIONS}
-Dlibpng=enabled
)
vcpkg_install_meson()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)