diff options
author | sanine <sanine.not@pm.me> | 2022-10-12 13:26:36 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-10-12 13:26:36 -0500 |
commit | f567ea1e2798fd3156a416e61f083ea3e6b95719 (patch) | |
tree | 53b51bda93aadf9dd13fcd77635b8c4b5c813768 /libs/pixman-0.40.0/cmake | |
parent | 530ffd0b7d3c39757b20f00716e486b5caf89aff (diff) |
add pixman and libpngraylib
Diffstat (limited to 'libs/pixman-0.40.0/cmake')
-rw-r--r-- | libs/pixman-0.40.0/cmake/PixmanConfig.cmake | 1 | ||||
-rw-r--r-- | libs/pixman-0.40.0/cmake/arch_configure.cmake | 20 | ||||
-rw-r--r-- | libs/pixman-0.40.0/cmake/arch_detect.cmake | 134 | ||||
-rw-r--r-- | libs/pixman-0.40.0/cmake/cmake_package.cmake | 45 | ||||
-rw-r--r-- | libs/pixman-0.40.0/cmake/config_configure.cmake | 96 | ||||
-rw-r--r-- | libs/pixman-0.40.0/cmake/config_source.cmake | 182 |
6 files changed, 478 insertions, 0 deletions
diff --git a/libs/pixman-0.40.0/cmake/PixmanConfig.cmake b/libs/pixman-0.40.0/cmake/PixmanConfig.cmake new file mode 100644 index 0000000..17daf5c --- /dev/null +++ b/libs/pixman-0.40.0/cmake/PixmanConfig.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/PixmanTargets.cmake")
\ No newline at end of file diff --git a/libs/pixman-0.40.0/cmake/arch_configure.cmake b/libs/pixman-0.40.0/cmake/arch_configure.cmake new file mode 100644 index 0000000..140b960 --- /dev/null +++ b/libs/pixman-0.40.0/cmake/arch_configure.cmake @@ -0,0 +1,20 @@ +target_architecture(ARCHITECTURE) +#options for arch +if(ARCHITECTURE STREQUAL "i386" OR ARCHITECTURE STREQUAL "x86_64") + SET(X86 1) + OPTION(X86_MMX "Enable MMX optimizations" OFF) + OPTION(X86_SSE2 "Enable SSE2 optimizations" OFF) + OPTION(X86_SSSE3 "Enable SSSE3 optimizations" OFF) +elseif(ARCHITECTURE STREQUAL "arm") + SET(ARM 1) + OPTION(ARM_IWMMXT "Enable IWMMXT compiler intrinsics" OFF) + OPTION(ARM_NEON "Enable NEON optimizations" OFF) + OPTION(ARM_SIMD "Enable SIMD optimizations" OFF) +elseif(ARCHITECTURE STREQUAL "ppc" OR ARCHITECTURE STREQUAL "ppc64") + SET(PPC 1) + OPTION(PPC_VMX "Enable VMX optimizations" OFF) +else() + SET(MIPS 1) + OPTION(MIPS_DSPR2 "Enable DSPR2 optimizations" OFF) + OPTION(MIPS_LOONGSON_MMI "Enable Loongson Multimedia Instructions" OFF) +endif(ARCHITECTURE STREQUAL "i386" OR ARCHITECTURE STREQUAL "x86_64")
\ No newline at end of file diff --git a/libs/pixman-0.40.0/cmake/arch_detect.cmake b/libs/pixman-0.40.0/cmake/arch_detect.cmake new file mode 100644 index 0000000..a99b1c4 --- /dev/null +++ b/libs/pixman-0.40.0/cmake/arch_detect.cmake @@ -0,0 +1,134 @@ +# Based on the Qt 5 processor detection code, so should be very accurate +# https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h +# Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64) + +# Regarding POWER/PowerPC, just as is noted in the Qt source, +# "There are many more known variants/revisions that we do not handle/detect." + +set(archdetect_c_code " +#if defined(__arm__) || defined(__TARGET_ARCH_ARM) + #if defined(__ARM_ARCH_7__) \\ + || defined(__ARM_ARCH_7A__) \\ + || defined(__ARM_ARCH_7R__) \\ + || defined(__ARM_ARCH_7M__) \\ + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7) + #error cmake_ARCH armv7 + #elif defined(__ARM_ARCH_6__) \\ + || defined(__ARM_ARCH_6J__) \\ + || defined(__ARM_ARCH_6T2__) \\ + || defined(__ARM_ARCH_6Z__) \\ + || defined(__ARM_ARCH_6K__) \\ + || defined(__ARM_ARCH_6ZK__) \\ + || defined(__ARM_ARCH_6M__) \\ + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6) + #error cmake_ARCH armv6 + #elif defined(__ARM_ARCH_5TEJ__) \\ + || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5) + #error cmake_ARCH armv5 + #else + #error cmake_ARCH arm + #endif +#elif defined(__i386) || defined(__i386__) || defined(_M_IX86) + #error cmake_ARCH i386 +#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) + #error cmake_ARCH x86_64 +#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) + #error cmake_ARCH ia64 +#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \\ + || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \\ + || defined(_M_MPPC) || defined(_M_PPC) + #if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__) + #error cmake_ARCH ppc64 + #else + #error cmake_ARCH ppc + #endif +#endif + +#error cmake_ARCH unknown +") + +# Set ppc_support to TRUE before including this file or ppc and ppc64 +# will be treated as invalid architectures since they are no longer supported by Apple + +function(target_architecture output_var) + if(APPLE AND CMAKE_OSX_ARCHITECTURES) + # On OS X we use CMAKE_OSX_ARCHITECTURES *if* it was set + # First let's normalize the order of the values + + # Note that it's not possible to compile PowerPC applications if you are using + # the OS X SDK version 10.6 or later - you'll need 10.4/10.5 for that, so we + # disable it by default + # See this page for more information: + # http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4 + + # Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime. + # On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise. + + foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES}) + if("${osx_arch}" STREQUAL "ppc" AND ppc_support) + set(osx_arch_ppc TRUE) + elseif("${osx_arch}" STREQUAL "i386") + set(osx_arch_i386 TRUE) + elseif("${osx_arch}" STREQUAL "x86_64") + set(osx_arch_x86_64 TRUE) + elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support) + set(osx_arch_ppc64 TRUE) + else() + message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}") + endif() + endforeach() + + # Now add all the architectures in our normalized order + if(osx_arch_ppc) + list(APPEND ARCH ppc) + endif() + + if(osx_arch_i386) + list(APPEND ARCH i386) + endif() + + if(osx_arch_x86_64) + list(APPEND ARCH x86_64) + endif() + + if(osx_arch_ppc64) + list(APPEND ARCH ppc64) + endif() + else() + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.c" "${archdetect_c_code}") + + enable_language(C) + + # Detect the architecture in a rather creative way... + # This compiles a small C program which is a series of ifdefs that selects a + # particular #error preprocessor directive whose message string contains the + # target architecture. The program will always fail to compile (both because + # file is not a valid C program, and obviously because of the presence of the + # #error preprocessor directives... but by exploiting the preprocessor in this + # way, we can detect the correct target architecture even when cross-compiling, + # since the program itself never needs to be run (only the compiler/preprocessor) + try_run( + run_result_unused + compile_result_unused + "${CMAKE_CURRENT_BINARY_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}/arch.c" + COMPILE_OUTPUT_VARIABLE ARCH + CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} + ) + + # Parse the architecture name from the compiler output + string(REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}") + + # Get rid of the value marker leaving just the architecture name + string(REPLACE "cmake_ARCH " "" ARCH "${ARCH}") + + # If we are compiling with an unknown architecture this variable should + # already be set to "unknown" but in the case that it's empty (i.e. due + # to a typo in the code), then set it to unknown + if (NOT ARCH) + set(ARCH unknown) + endif() + endif() + + set(${output_var} "${ARCH}" PARENT_SCOPE) +endfunction() diff --git a/libs/pixman-0.40.0/cmake/cmake_package.cmake b/libs/pixman-0.40.0/cmake/cmake_package.cmake new file mode 100644 index 0000000..957ed2c --- /dev/null +++ b/libs/pixman-0.40.0/cmake/cmake_package.cmake @@ -0,0 +1,45 @@ +include(CMakePackageConfigHelpers) +set(ConfigPackageLocation lib/cmake/pixman) + +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfigVersion.cmake" + VERSION + ${PIXMAN_VERSION} + COMPATIBILITY + AnyNewerVersion +) + +export( + EXPORT + PixmanTargets + FILE + "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanTargets.cmake" + NAMESPACE + Upstream:: +) + +configure_file(cmake/PixmanConfig.cmake + "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfig.cmake" + COPYONLY +) + +install( + EXPORT + PixmanTargets + FILE + PixmanTargets.cmake + NAMESPACE + Upstream:: + DESTINATION + ${ConfigPackageLocation} +) + +install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfigVersion.cmake" + DESTINATION + ${ConfigPackageLocation} + COMPONENT + Devel +)
\ No newline at end of file diff --git a/libs/pixman-0.40.0/cmake/config_configure.cmake b/libs/pixman-0.40.0/cmake/config_configure.cmake new file mode 100644 index 0000000..354237e --- /dev/null +++ b/libs/pixman-0.40.0/cmake/config_configure.cmake @@ -0,0 +1,96 @@ +# Checking Headers and Functions for pixman +add_definitions(-DHAVE_CONFIG_H) + +include( CheckIncludeFile ) +include( CheckFunctionExists ) +include( CheckLibraryExists ) +include( CheckTypeSize) + +if(OPENMP_FOUND) + set(USE_OPENMP 1) +endif() + +if(PNG_FOUND) + set(HAVE_LIBPNG 1) +endif() + +if(CMAKE_USE_PTHREADS_INIT) + set(HAVE_PTHREADS 1) +endif() + +if(CMAKE_COMPILER_IS_GNUCC) + set(HAVE_GCC_VECTOR_EXTENSIONS 1) +endif() + +check_include_file( "dlfcn.h" HAVE_DLFCN_H ) +check_include_file( "fenv.h" HAVE_FENV_H ) +check_include_file( "inttypes.h" HAVE_INTTYPES_H ) +check_include_file( "memory.h" HAVE_MEMORY_H ) +check_include_file( "stdint.h" HAVE_STDINT_H ) +check_include_file( "stdlib.h" HAVE_STDLIB_H ) +check_include_file( "strings.h" HAVE_STRINGS_H ) +check_include_file( "string.h" HAVE_STRING_H ) +check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H ) +check_include_file( "sys/stat.h" HAVE_SYS_STAT_H ) +check_include_file( "sys/types.h" HAVE_SYS_TYPES_H ) +check_include_file( "unistd.h" HAVE_UNISTD_H ) + +check_function_exists( __builtin_clz HAVE_BUILTIN_CLZ ) +check_function_exists( alarm HAVE_ALARM ) +check_function_exists( feenableexcept HAVE_FEENABLEEXCEPT ) +check_function_exists( getisax HAVE_GETISAX ) +check_function_exists( getpagesize HAVE_GETPAGESIZE ) +check_function_exists( gettimeofday HAVE_GETTIMEOFDAY ) +check_function_exists( mmap HAVE_MMAP ) +check_function_exists( mprotect HAVE_MPROTECT ) +check_function_exists( posix_memalign HAVE_POSIX_MEMALIGN ) +check_function_exists( sigaction HAVE_SIGACTION ) + +CHECK_TYPE_SIZE("long" SIZEOF_LONG) +CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) +if(SIZEOF___FLOAT128) + set(HAVE_FLOAT128 1) +endif() + +if (ARM_IWMMXT) + set(USE_ARM_IWMMXT 1) +endif (ARM_IWMMXT) +if (ARM_NEON) + set(USE_ARM_NEON 1) +endif (ARM_NEON) +if (ARM_SIMD) + set(USE_ARM_SIMD 1) +endif (ARM_SIMD) + +if (PPC_VMX) + set(USE_VMX 1) +endif (PPC_VMX) + +if (MIPS_LOONGSON_MMI) + set(USE_LOONGSON_MMI 1) +endif (MIPS_LOONGSON_MMI) +if (MIPS_DSPR2) + set(USE_MIPS_DSPR2 1) +endif (MIPS_DSPR2) + +if (X86_MMX) + set(USE_X86_MMX 1) + if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmmx") + endif(CMAKE_COMPILER_IS_GNUCC) +endif (X86_MMX) +if (X86_SSE2) + set(USE_SSE2 1) + if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2") + endif(CMAKE_COMPILER_IS_GNUCC) +endif (X86_SSE2) +if (X86_SSSE3) + set(USE_SSSE3 1) + if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -mssse3") + endif(CMAKE_COMPILER_IS_GNUCC) +endif(X86_SSSE3) + +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/config_source.cmake ${CMAKE_CURRENT_BINARY_DIR}/pixman/config.h ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/pixman/pixman-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/pixman/pixman-version.h)
\ No newline at end of file diff --git a/libs/pixman-0.40.0/cmake/config_source.cmake b/libs/pixman-0.40.0/cmake/config_source.cmake new file mode 100644 index 0000000..ffd1de3 --- /dev/null +++ b/libs/pixman-0.40.0/cmake/config_source.cmake @@ -0,0 +1,182 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#cmakedefine AC_APPLE_UNIVERSAL_BUILD + +/* Whether we have alarm() */ +#cmakedefine HAVE_ALARM @HAVE_ALARM@ + +/* Whether the compiler supports __builtin_clz */ +#cmakedefine HAVE_BUILTIN_CLZ @HAVE_BUILTIN_CLZ@ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@ + +/* Whether we have feenableexcept() */ +#cmakedefine HAVE_FEENABLEEXCEPT @HAVE_FEENABLEEXCEPT@ + +/* Define to 1 if we have <fenv.h> */ +#cmakedefine HAVE_FENV_H @HAVE_FENV_H@ + +/* Whether the tool chain supports __float128 */ +#cmakedefine HAVE_FLOAT128 @HAVE_FLOAT128@ + +/* Define to 1 if you have the `getisax' function. */ +#cmakedefine HAVE_GETISAX @HAVE_GETISAX@ + +/* Whether we have getpagesize() */ +#cmakedefine HAVE_GETPAGESIZE @HAVE_GETPAGESIZE@ + +/* Whether we have gettimeofday() */ +#cmakedefine HAVE_GETTIMEOFDAY @HAVE_GETTIMEOFDAY@ + +/* Define to 1 if you have the <inttypes.h> header file. */ +#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ + +/* Define to 1 if you have the `pixman-1' library (-lpixman-1). */ +#cmakedefine HAVE_LIBPIXMAN_1 + +/* Whether we have libpng */ +#cmakedefine HAVE_LIBPNG @HAVE_LIBPNG@ + +/* Define to 1 if you have the <memory.h> header file. */ +#cmakedefine HAVE_MEMORY_H @HAVE_MEMORY_H@ + +/* Whether we have mmap() */ +#cmakedefine HAVE_MMAP @HAVE_MMAP@ + +/* Whether we have mprotect() */ +#cmakedefine HAVE_MPROTECT @HAVE_MPROTECT@ + +/* Whether we have posix_memalign() */ +#cmakedefine HAVE_POSIX_MEMALIGN @HAVE_POSIX_MEMALIGN@ + +/* Whether pthreads is supported */ +#cmakedefine HAVE_PTHREADS @HAVE_PTHREADS@ + +/* Whether we have sigaction() */ +#cmakedefine HAVE_SIGACTION @HAVE_SIGACTION@ + +/* Define to 1 if you have the <stdint.h> header file. */ +#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ + +/* Define to 1 if you have the <stdlib.h> header file. */ +#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ + +/* Define to 1 if you have the <strings.h> header file. */ +#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@ + +/* Define to 1 if you have the <string.h> header file. */ +#cmakedefine HAVE_STRING_H @HAVE_STRING_H@ + +/* Define to 1 if we have <sys/mman.h> */ +#cmakedefine HAVE_SYS_MMAN_H @HAVE_SYS_MMAN_H@ + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@ + +/* Define to 1 if you have the <sys/types.h> header file. */ +#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ + +/* Define to 1 if you have the <unistd.h> header file. */ +#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#cmakedefine LT_OBJDIR + +/* Name of package */ +#cmakedefine PACKAGE @PACKAGE@ + +/* Define to the address where bug reports for this package should be sent. */ +#cmakedefine PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#cmakedefine PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#cmakedefine PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#cmakedefine PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#cmakedefine PACKAGE_URL + +/* Define to the version of this package. */ +#cmakedefine PACKAGE_VERSION + +/* enable TIMER_BEGIN/TIMER_END macros */ +#cmakedefine PIXMAN_TIMERS + +/* The size of `long', as computed by sizeof. */ +#cmakedefine SIZEOF_LONG @SIZEOF_LONG@ + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine STDC_HEADERS 1 + +/* The compiler supported TLS storage class */ +#cmakedefine TLS + +/* Whether the tool chain supports __attribute__((constructor)) */ +#cmakedefine TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR + +/* use ARM IWMMXT compiler intrinsics */ +#cmakedefine USE_ARM_IWMMXT @USE_ARM_IWMMXT@ + +/* use ARM NEON assembly optimizations */ +#cmakedefine USE_ARM_NEON @USE_ARM_NEON@ + +/* use ARM SIMD assembly optimizations */ +#cmakedefine USE_ARM_SIMD @USE_ARM_SIMD@ + +/* use GNU-style inline assembler */ +#cmakedefine USE_GCC_INLINE_ASM + +/* use Loongson Multimedia Instructions */ +#cmakedefine USE_LOONGSON_MMI @USE_LOONGSON_MMI@ + +/* use MIPS DSPr2 assembly optimizations */ +#cmakedefine USE_MIPS_DSPR2 @USE_MIPS_DSPR2@ + +/* use OpenMP in the test suite */ +#cmakedefine USE_OPENMP @OPENMP_FOUND@ + +/* use SSE2 compiler intrinsics */ +#cmakedefine USE_SSE2 @USE_SSE2@ + +/* use SSSE3 compiler intrinsics */ +#cmakedefine USE_SSSE3 @USE_SSSE3@ + +/* use VMX compiler intrinsics */ +#cmakedefine USE_VMX @USE_VMX@ + +/* use x86 MMX compiler intrinsics */ +#cmakedefine USE_X86_MMX @USE_X86_MMX@ + +/* use GCC Vector Extensions */ +#cmakedefine HAVE_GCC_VECTOR_EXTENSIONS @HAVE_GCC_VECTOR_EXTENSIONS@ + +/* use OpenMP +#cmakedefine USE_OPENMP @USE_OPENMP@ + +/* Version number of package */ +#cmakedefine VERSION @PIXMAN_VERSION@ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif
\ No newline at end of file |