aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/pixman/CMakeLists.txt28
-rw-r--r--ports/pixman/CONTROL2
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 $<INSTALL_INTERFACE:include>)
-
-# 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 $<INSTALL_INTERFACE:include>)
+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.