diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-11 23:41:51 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-11 23:42:54 -0700 |
| commit | 9f9778ccff48981a691bf34f30ecc4bf2efd5ac1 (patch) | |
| tree | 10ec609d13836ddc266345f441bae6f9e824056a /ports/pixman | |
| parent | ece289b9a6466dca885fd2555ed783d70dcad9bf (diff) | |
| download | vcpkg-9f9778ccff48981a691bf34f30ecc4bf2efd5ac1.tar.gz vcpkg-9f9778ccff48981a691bf34f30ecc4bf2efd5ac1.zip | |
[many ports] Improve behavior on Linux and general cleanup
Diffstat (limited to 'ports/pixman')
| -rw-r--r-- | ports/pixman/CMakeLists.txt | 64 | ||||
| -rw-r--r-- | ports/pixman/CMakeLists_pixman.txt | 53 | ||||
| -rw-r--r-- | ports/pixman/portfile.cmake | 35 |
3 files changed, 74 insertions, 78 deletions
diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt index aad6ec778..322c08a9c 100644 --- a/ports/pixman/CMakeLists.txt +++ b/ports/pixman/CMakeLists.txt @@ -1,4 +1,64 @@ cmake_minimum_required(VERSION 3.0) -project(pixman VERSION 0.32.0 LANGUAGES C CXX) +project(pixman VERSION 0.32.0 LANGUAGES C) -add_subdirectory(pixman)
\ No newline at end of file +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_DEBUG_POSTFIX "d") + +include_directories(".") + +file(GLOB SOURCES +"pixman.c" +"pixman-access.c" +"pixman-access-accessors.c" +"pixman-bits-image.c" +"pixman-combine32.c" +"pixman-combine-float.c" +"pixman-conical-gradient.c" +"pixman-filter.c" +"pixman-x86.c" +"pixman-mips.c" +"pixman-arm.c" +"pixman-ppc.c" +"pixman-edge.c" +"pixman-edge-accessors.c" +"pixman-fast-path.c" +"pixman-glyph.c" +"pixman-general.c" +"pixman-gradient-walker.c" +"pixman-image.c" +"pixman-implementation.c" +"pixman-linear-gradient.c" +"pixman-matrix.c" +"pixman-noop.c" +"pixman-radial-gradient.c" +"pixman-region16.c" +"pixman-region32.c" +"pixman-solid-fill.c" +"pixman-timer.c" +"pixman-trap.c" +"pixman-utils.c" +"pixman-sse2.c" +) + +add_library(pixman-1 ${SOURCES}) + +# 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 + PUBLIC + PACKAGE="pixman-1" + PACKAGE_VERSION="0.34.0" + PACKAGE_BUGREPORT="" + PRIVATE + USE_SSE2 +) + +# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files +if(MSVC) + target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" +endif() + +install(TARGETS pixman-1 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/pixman/CMakeLists_pixman.txt b/ports/pixman/CMakeLists_pixman.txt deleted file mode 100644 index c8030bcd6..000000000 --- a/ports/pixman/CMakeLists_pixman.txt +++ /dev/null @@ -1,53 +0,0 @@ -# Add include directories -include_directories(".") - -FILE(GLOB SOURCES -"pixman.c" -"pixman-access.c" -"pixman-access-accessors.c" -"pixman-bits-image.c" -"pixman-combine32.c" -"pixman-combine-float.c" -"pixman-conical-gradient.c" -"pixman-filter.c" -"pixman-x86.c" -"pixman-mips.c" -"pixman-arm.c" -"pixman-ppc.c" -"pixman-edge.c" -"pixman-edge-accessors.c" -"pixman-fast-path.c" -"pixman-glyph.c" -"pixman-general.c" -"pixman-gradient-walker.c" -"pixman-image.c" -"pixman-implementation.c" -"pixman-linear-gradient.c" -"pixman-matrix.c" -"pixman-noop.c" -"pixman-radial-gradient.c" -"pixman-region16.c" -"pixman-region32.c" -"pixman-solid-fill.c" -"pixman-timer.c" -"pixman-trap.c" -"pixman-utils.c" -"pixman-sse2.c" -) - -set(CMAKE_DEBUG_POSTFIX "d") - -add_library(pixman-1 ${SOURCES}) - -# 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 PUBLIC PACKAGE="pixman-1" PUBLIC PACKAGE_VERSION="0.34.0" PUBLIC PACKAGE_BUGREPORT="" PUBLIC USE_SSE2) - -# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files -target_compile_options(pixman-1 PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" - -# The LIBRARY DESTINATION here is lib rather than bin because pixman must always be compiled as a static library since it has no exports. -install(TARGETS pixman-1 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index ac6de80f0..4fb37f6d9 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,11 +1,3 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pixman-0.34.0) @@ -17,29 +9,26 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_pixman.txt DESTINATION ${SOURCE_PATH}/pixman) -file(RENAME ${SOURCE_PATH}/pixman/CMakeLists_pixman.txt ${SOURCE_PATH}/pixman/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + SOURCE_PATH ${SOURCE_PATH}/pixman + PREFER_NINJA ) vcpkg_install_cmake() # Copy the appropriate header files. file(COPY -"${SOURCE_PATH}/pixman/pixman.h" -"${SOURCE_PATH}/pixman/pixman-accessor.h" -"${SOURCE_PATH}/pixman/pixman-combine32.h" -"${SOURCE_PATH}/pixman/pixman-compiler.h" -"${SOURCE_PATH}/pixman/pixman-edge-imp.h" -"${SOURCE_PATH}/pixman/pixman-inlines.h" -"${SOURCE_PATH}/pixman/pixman-private.h" -"${SOURCE_PATH}/pixman/pixman-version.h" -DESTINATION -${CURRENT_PACKAGES_DIR}/include + "${SOURCE_PATH}/pixman/pixman.h" + "${SOURCE_PATH}/pixman/pixman-accessor.h" + "${SOURCE_PATH}/pixman/pixman-combine32.h" + "${SOURCE_PATH}/pixman/pixman-compiler.h" + "${SOURCE_PATH}/pixman/pixman-edge-imp.h" + "${SOURCE_PATH}/pixman/pixman-inlines.h" + "${SOURCE_PATH}/pixman/pixman-private.h" + "${SOURCE_PATH}/pixman/pixman-version.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include ) # Handle copyright |
