From e54a0ec7f44a879ecee8d9d7d9acdb277ece6dcc Mon Sep 17 00:00:00 2001 From: driver1998 Date: Thu, 18 Apr 2019 02:15:56 +0800 Subject: [pixman] arm/arm64 windows support (#6117) * fixes pixman arm/arm64 windows build * bump pixman version to 0.38.0-2 --- ports/pixman/CMakeLists.txt | 28 ++++++++++++++++++---------- ports/pixman/CONTROL | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt index 55adf8b9c..ad2f5e503 100644 --- a/ports/pixman/CMakeLists.txt +++ b/ports/pixman/CMakeLists.txt @@ -41,21 +41,29 @@ file(GLOB SOURCES "pixman-timer.c" "pixman-trap.c" "pixman-utils.c" -"pixman-sse2.c" ) -add_library(pixman-1 ${SOURCES}) -target_include_directories(pixman-1 PUBLIC $) - -# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days. -target_compile_definitions(pixman-1 +# pixman requires the three PACKAGE* definitions in order to compile. +set(PIXMAN_DEFS PRIVATE - PACKAGE="pixman-1" - PACKAGE_VERSION="0.34.0" - PACKAGE_BUGREPORT="" - USE_SSE2 + PACKAGE="pixman-1" + PACKAGE_VERSION="0.34.0" + PACKAGE_BUGREPORT="" ) +if(VCPKG_TARGET_TRIPLET STREQUAL arm64-windows OR VCPKG_TARGET_TRIPLET STREQUAL arm-windows) + # don't enable SSE2 for arm64-windows and arm-windows +else() + # The USE_SSE2 definition lets it use SSE2 instructions for speed. Every x86/64 target machine should have SSE2 these days. + set(PIXMAN_DEFS ${PIXMAN_DEFS} USE_SSE2) + file(GLOB SSE2_SOURCES "pixman-sse2.c") + set(SOURCES ${SOURCES} ${SSE2_SOURCES}) +endif() + +add_library(pixman-1 ${SOURCES}) +target_include_directories(pixman-1 PUBLIC $) +target_compile_definitions(pixman-1 ${PIXMAN_DEFS}) + if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 4) target_compile_options(pixman-1 PRIVATE -msse2) endif() diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL index 7ea0dc3d7..3e2caf1ca 100644 --- a/ports/pixman/CONTROL +++ b/ports/pixman/CONTROL @@ -1,3 +1,3 @@ Source: pixman -Version: 0.38.0-1 +Version: 0.38.0-2 Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. -- cgit v1.2.3