summaryrefslogtreecommitdiff
path: root/libs/pixman-0.40.0/CMakeLists.txt
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-10-12 13:26:36 -0500
committersanine <sanine.not@pm.me>2022-10-12 13:26:36 -0500
commitf567ea1e2798fd3156a416e61f083ea3e6b95719 (patch)
tree53b51bda93aadf9dd13fcd77635b8c4b5c813768 /libs/pixman-0.40.0/CMakeLists.txt
parent530ffd0b7d3c39757b20f00716e486b5caf89aff (diff)
add pixman and libpngraylib
Diffstat (limited to 'libs/pixman-0.40.0/CMakeLists.txt')
-rw-r--r--libs/pixman-0.40.0/CMakeLists.txt53
1 files changed, 53 insertions, 0 deletions
diff --git a/libs/pixman-0.40.0/CMakeLists.txt b/libs/pixman-0.40.0/CMakeLists.txt
new file mode 100644
index 0000000..abcdd44
--- /dev/null
+++ b/libs/pixman-0.40.0/CMakeLists.txt
@@ -0,0 +1,53 @@
+project(pixman)
+set(PACKAGE pixman)
+cmake_minimum_required(VERSION 2.8.8)
+
+# detect version
+file (READ configure.ac configure_ac)
+string (REGEX REPLACE ".*pixman_major], ([0-9]+).*" "\\1" PIXMAN_VERSION_MAJOR ${configure_ac})
+string (REGEX REPLACE ".*pixman_minor], ([0-9]+).*" "\\1" PIXMAN_VERSION_MINOR ${configure_ac})
+string (REGEX REPLACE ".*pixman_micro], ([0-9]+).*" "\\1" PIXMAN_VERSION_MICRO ${configure_ac})
+set(PIXMAN_VERSION "${PIXMAN_VERSION_MAJOR}.${PIXMAN_VERSION_MINOR}.${PIXMAN_VERSION_MICRO}")
+
+if(NOT MSVC)
+ option(BUILD_SHARED "build shared library" OFF)
+endif()
+option(BUILD_STATIC "build static library" ON)
+if(BUILD_STATIC)
+ option(BUILD_TESTS "build tests" OFF)
+endif()
+
+set(CMAKE_DEBUG_POSTFIX "d")
+
+#dependencies
+find_package(Threads)
+if(BUILD_TESTS)
+ find_package(PNG)
+ find_package(OpenMP)
+endif()
+
+#arch optimizations
+include(${CMAKE_CURRENT_LIST_DIR}/cmake/arch_detect.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/cmake/arch_configure.cmake)
+
+#config
+include(${CMAKE_CURRENT_LIST_DIR}/cmake/config_configure.cmake)
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}/pixman
+ ${CMAKE_CURRENT_LIST_DIR}/pixman
+)
+
+if(MSVC)
+ set(CMAKE_C_FLAGS "/wd4244 /wd4146 ${CMAKE_C_FLAGS}")
+endif()
+
+if(BUILD_SHARED OR BUILD_STATIC)
+ add_subdirectory(pixman)
+endif()
+
+if(BUILD_TESTS)
+ add_subdirectory(test)
+endif(BUILD_TESTS)
+
+include(${CMAKE_CURRENT_LIST_DIR}/cmake/cmake_package.cmake)