summaryrefslogtreecommitdiff
path: root/CMake/FindFreeImage.cmake
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:00 +0200
commitb623f5953691b2a0614e6f1f4def86bdbb9a4113 (patch)
tree18102bd36f7e22eb2ba2b9f880e4cb29346f4cb8 /CMake/FindFreeImage.cmake
parent359b557176b9bb2ff1aed2082641eed39c358d0d (diff)
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1
Diffstat (limited to 'CMake/FindFreeImage.cmake')
-rw-r--r--CMake/FindFreeImage.cmake58
1 files changed, 58 insertions, 0 deletions
diff --git a/CMake/FindFreeImage.cmake b/CMake/FindFreeImage.cmake
new file mode 100644
index 0000000..6073916
--- /dev/null
+++ b/CMake/FindFreeImage.cmake
@@ -0,0 +1,58 @@
+#
+# Try to find the FreeImage library and include path.
+# Once done this will define
+#
+# FREEIMAGE_FOUND
+# FREEIMAGE_INCLUDE_PATH
+# FREEIMAGE_LIBRARY
+# FREEIMAGE_SHAREDLIB (Win32 only)
+#
+# There is no default installation for FreeImage on Windows so a
+# XTrackCAD specific directory tree is assumed
+#
+
+if (WIN32)
+ find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h
+ PATHS
+ $ENV{XTCEXTERNALROOT}/x86/FreeImage
+ DOC "The directory where FreeImage.h resides")
+ find_library( FREEIMAGE_LIBRARY
+ NAMES FreeImage freeimage
+ PATHS
+ $ENV{XTCEXTERNALROOT}/x86/FreeImage
+ DOC "The FreeImage library")
+ find_file( FREEIMAGE_SHAREDLIB
+ NAMES freeimage.DLL
+ PATHS
+ $ENV{XTCEXTERNALROOT}/x86/FreeImage
+ )
+else (WIN32)
+ find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h
+ /usr/include
+ /usr/local/include
+ /sw/include
+ /opt/local/include
+ DOC "The directory where FreeImage.h resides")
+ find_library( FREEIMAGE_LIBRARY
+ NAMES FreeImage freeimage
+ PATHS
+ /usr/lib64
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
+ /sw/lib
+ /opt/local/lib
+ DOC "The FreeImage library")
+endif (WIN32)
+
+find_package_handle_standard_args( FreeImage
+ DEFAULT_MSG
+ FREEIMAGE_LIBRARY
+ FREEIMAGE_INCLUDE_PATH
+)
+
+mark_as_advanced(
+ FREEIMAGE_FOUND
+ FREEIMAGE_LIBRARY
+ FREEIMAGE_INCLUDE_PATH
+ FREEIMAGE_SHAREDLIB)