summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/Modules/FindLibCDR.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:01 +0000
commit35a96bde514a8897f6f0fcc41c5833bf63df2e2a (patch)
tree657d15a03cc46bd099fc2c6546a7a4ad43815d9f /CMakeScripts/Modules/FindLibCDR.cmake
parentInitial commit. (diff)
downloadinkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.tar.xz
inkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.zip
Adding upstream version 1.0.2.upstream/1.0.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'CMakeScripts/Modules/FindLibCDR.cmake')
-rw-r--r--CMakeScripts/Modules/FindLibCDR.cmake56
1 files changed, 56 insertions, 0 deletions
diff --git a/CMakeScripts/Modules/FindLibCDR.cmake b/CMakeScripts/Modules/FindLibCDR.cmake
new file mode 100644
index 0000000..57a0480
--- /dev/null
+++ b/CMakeScripts/Modules/FindLibCDR.cmake
@@ -0,0 +1,56 @@
+# - Try to find LibCDR
+# Once done this will define
+#
+# LIBCDR_FOUND - system has LibCDR
+# LIBCDR_INCLUDE_DIRS - the LibCDR include directory
+# LIBCDR_LIBRARIES - Link these to use LibCDR
+# LIBCDR_DEFINITIONS - Compiler switches required for using LibCDR
+#
+# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
+# Copyright (c) 2015 su_v <suv-sf@users.sf.net>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+include(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
+
+if (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
+ # in cache already
+ set(LIBCDR_FOUND TRUE)
+else (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ INKSCAPE_PKG_CONFIG_FIND(LIBCDR-0.1 libcdr-0.1 0 libcdr/libcdr.h libcdr-0.1 cdr-0.1)
+ if (LIBCDR-0.1_FOUND)
+ find_package(LibRevenge)
+ if (LIBREVENGE_FOUND)
+ list(APPEND LIBCDR_INCLUDE_DIRS ${LIBCDR-0.1_INCLUDE_DIRS})
+ list(APPEND LIBCDR_LIBRARIES ${LIBCDR-0.1_LIBRARIES})
+ list(APPEND LIBCDR_INCLUDE_DIRS ${LIBREVENGE_INCLUDE_DIRS})
+ list(APPEND LIBCDR_LIBRARIES ${LIBREVENGE_LIBRARIES})
+ set(LIBCDR01_FOUND TRUE)
+ endif (LIBREVENGE_FOUND)
+ else()
+ INKSCAPE_PKG_CONFIG_FIND(LIBCDR-0.0 libcdr-0.0 0 libcdr/libcdr.h libcdr-0.0 cdr-0.0)
+ INKSCAPE_PKG_CONFIG_FIND(LIBWPD-0.9 libwpd-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-0.9)
+ INKSCAPE_PKG_CONFIG_FIND(LIBWPD-STREAM-0.9 libwpd-stream-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-stream-0.9)
+ if (LIBCDR-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
+ list(APPEND LIBCDR_INCLUDE_DIRS ${LIBCDR-0.0_INCLUDE_DIRS})
+ list(APPEND LIBCDR_LIBRARIES ${LIBCDR-0.0_LIBRARIES})
+ list(APPEND LIBCDR_INCLUDE_DIRS ${LIBWPD-0.9_INCLUDE_DIRS})
+ list(APPEND LIBCDR_LIBRARIES ${LIBWPD-0.9_LIBRARIES})
+ list(APPEND LIBCDR_INCLUDE_DIRS ${LIBWPD-STREAM-0.9_INCLUDE_DIRS})
+ list(APPEND LIBCDR_LIBRARIES ${LIBWPD-STREAM-0.9_LIBRARIES})
+ set(LIBCDR00_FOUND TRUE)
+ endif (LIBCDR-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
+ endif (LIBCDR-0.1_FOUND)
+ if (LIBCDR-0.1_FOUND OR LIBCDR-0.0_FOUND)
+ set(LIBCDR_FOUND TRUE)
+ endif (LIBCDR-0.1_FOUND OR LIBCDR-0.0_FOUND)
+ endif (PKG_CONFIG_FOUND)
+endif (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
+