summaryrefslogtreecommitdiff
path: root/CMake/FindLCMS.cmake
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2011-07-13 16:49:53 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2011-07-13 16:49:53 +0000
commit65f7f8dc506e3c889e137bef1c730644fc7798eb (patch)
treed2b3b3c100541849d7e47e3982b053a61bcd2eda /CMake/FindLCMS.cmake
parent36c8d85f4335b3d6dd518e45efe3b6ccedda4c06 (diff)
improved some CMakeLists files linked to the build of applications which used thirdparty
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..1a476a4a
--- /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(LCMS_FOUND)