summaryrefslogtreecommitdiff
path: root/cmake/FindLCMS2.cmake
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-09-28 08:11:41 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-09-28 08:11:41 +0000
commitd518970039a19a2a9b6d2bdd592cc88a43897bbb (patch)
tree57bac2cf7e63e9352228231062763baac627563c /cmake/FindLCMS2.cmake
parent8363a6ab1e031bb4b2e40a92e56efd40fdab1aa1 (diff)
[trunk] Start FolderReorgProposal task
Update issue 177
Diffstat (limited to 'cmake/FindLCMS2.cmake')
-rw-r--r--cmake/FindLCMS2.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/FindLCMS2.cmake b/cmake/FindLCMS2.cmake
new file mode 100644
index 00000000..65b6525c
--- /dev/null
+++ b/cmake/FindLCMS2.cmake
@@ -0,0 +1,31 @@
+# - 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()