diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
commit | df247efec654e512242e4f4f1b0212034f9e01fe (patch) | |
tree | 25c02e16957f3aa613af30c140fd8e8a3d52fda6 /CMake/FindFreeImage.cmake | |
parent | d0b6a8a4ec298024f14f704f9e40a6f9d324ccf3 (diff) | |
parent | a5ade52caa489cf0a713e0f02b764000d203140e (diff) |
Merge branch 'release/debian/1%5.2.0Beta2.1-1' into masterdebian/1%5.2.0Beta2.1-1
Diffstat (limited to 'CMake/FindFreeImage.cmake')
-rw-r--r-- | CMake/FindFreeImage.cmake | 58 |
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)
|