Skip to content

Commit

Permalink
[pixman] arm/arm64 windows support (microsoft#6117)
Browse files Browse the repository at this point in the history
* fixes pixman arm/arm64 windows build

* bump pixman version to 0.38.0-2
  • Loading branch information
driver1998 authored and grdowns committed Apr 17, 2019
1 parent 00728b3 commit e54a0ec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
28 changes: 18 additions & 10 deletions ports/pixman/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion ports/pixman/CONTROL
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit e54a0ec

Please sign in to comment.