summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libcroco/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libcroco/CMakeLists.txt')
-rw-r--r--src/3rdparty/libcroco/CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/3rdparty/libcroco/CMakeLists.txt b/src/3rdparty/libcroco/CMakeLists.txt
new file mode 100644
index 0000000..d3e0366
--- /dev/null
+++ b/src/3rdparty/libcroco/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 3.6)
+
+project(libcroco LANGUAGES C)
+
+if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ set(LIBCROCO_STANDALONE TRUE)
+endif()
+
+set(LIBCROCO_MAJOR_VERSION 0)
+set(LIBCROCO_MINOR_VERSION 6)
+set(LIBCROCO_MICRO_VERSION 99)
+set(LIBCROCO_VERSION ${LIBCROCO_MAJOR_VERSION}.${LIBCROCO_MINOR_VERSION}.${LIBCROCO_MICRO_VERSION})
+math(EXPR LIBCROCO_VERSION_NUMBER "${LIBCROCO_MAJOR_VERSION} * 10000 +
+ ${LIBCROCO_MINOR_VERSION} * 100 +
+ ${LIBCROCO_MICRO_VERSION}")
+
+find_package(PkgConfig REQUIRED)
+
+set(GLIB_REQUIRED 2.0)
+set(LIBXML_REQUIRED 2.4.23)
+
+pkg_check_modules(GLIB REQUIRED glib-2.0>=${GLIB_REQUIRED})
+pkg_check_modules(LIBXML REQUIRED libxml-2.0>=${LIBXML_REQUIRED})
+
+add_subdirectory(src)
+
+option(LIBCROCO_TESTING "Build tests" "${LIBCROCO_STANDALONE}")
+
+if (LIBCROCO_TESTING)
+ enable_testing()
+ add_subdirectory(csslint)
+ add_subdirectory(tests)
+endif()