summaryrefslogtreecommitdiff
path: root/cmake/FindLCMS.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/FindLCMS.cmake
parent8363a6ab1e031bb4b2e40a92e56efd40fdab1aa1 (diff)
[trunk] Start FolderReorgProposal task
Update issue 177
Diffstat (limited to 'cmake/FindLCMS.cmake')
-rw-r--r--cmake/FindLCMS.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/FindLCMS.cmake b/cmake/FindLCMS.cmake
new file mode 100644
index 00000000..e659895d
--- /dev/null
+++ b/cmake/FindLCMS.cmake
@@ -0,0 +1,31 @@
+# - Find LCMS library
+# Find the native LCMS includes and library
+# Once done this will define
+#
+# LCMS_INCLUDE_DIR - Where to find lcms.h, etc.
+# LCMS_LIBRARIES - Libraries to link against to use LCMS.
+# LCMS_FOUND - If false, do not try to use LCMS.
+#
+# also defined, but not for general use are
+# LCMS_LIBRARY, where to find the LCMS library.
+
+#=============================================================================
+#=============================================================================
+
+find_path(LCMS_INCLUDE_DIR lcms.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
+
+set(LCMS_NAMES ${LCMS_NAMES} lcms liblcms liblcms_static)
+
+find_library(LCMS_LIBRARY NAMES ${LCMS_NAMES} )
+
+mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARY)
+
+# handle the QUIETLY and REQUIRED arguments and set LCMS_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS DEFAULT_MSG LCMS_LIBRARY LCMS_INCLUDE_DIR)
+
+if(LCMS_FOUND)
+ set( LCMS_INCLUDE_DIRS ${LCMS_INCLUDE_DIR})
+ set( LCMS_LIBRARIES ${LCMS_LIBRARY} )
+endif()