summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/Modules/FindLCMS2.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/FindLCMS2.cmake
parentInitial commit. (diff)
downloadinkscape-upstream/1.0.2.tar.xz
inkscape-upstream/1.0.2.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/FindLCMS2.cmake')
-rw-r--r--CMakeScripts/Modules/FindLCMS2.cmake38
1 files changed, 38 insertions, 0 deletions
diff --git a/CMakeScripts/Modules/FindLCMS2.cmake b/CMakeScripts/Modules/FindLCMS2.cmake
new file mode 100644
index 0000000..e5f24ce
--- /dev/null
+++ b/CMakeScripts/Modules/FindLCMS2.cmake
@@ -0,0 +1,38 @@
+# This file was taken from the openjpeg library:
+#
+# http://code.google.com/p/openjpeg/source/browse/trunk/cmake/FindLCMS2.cmake?r=1987
+#
+# Thanks!
+
+# - Find LCMS2 library
+# Find the native LCMS2 includes and library
+# Once done this will define
+#
+# LCMS2_INCLUDE_DIR - Where to find lcms2.h, etc.
+# LCMS2_LIBRARIES - Libraries to link against to use LCMS2.
+# LCMS2_FOUND - If false, do not try to use LCMS2.
+#
+# also defined, but not for general use are
+# LCMS2_LIBRARY - Where to find the LCMS2 library.
+
+#=============================================================================
+#=============================================================================
+
+find_path(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
+
+set(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
+
+find_library(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
+
+mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY)
+
+# handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
+
+if(LCMS2_FOUND)
+set( LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR})
+set( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
+endif()
+