summaryrefslogtreecommitdiffstats
path: root/cmake/FindFgLib5.cmake
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-02-21 15:06:42 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-02-21 15:06:42 +0100
commit28619821bc90ed4c15844b2e6b6a5a2971ef5f2e (patch)
treec313b5b77087c18027d152c4c69c49b8ea0254d9 /cmake/FindFgLib5.cmake
downloadlibuca-28619821bc90ed4c15844b2e6b6a5a2971ef5f2e.tar.gz
libuca-28619821bc90ed4c15844b2e6b6a5a2971ef5f2e.tar.bz2
libuca-28619821bc90ed4c15844b2e6b6a5a2971ef5f2e.tar.xz
libuca-28619821bc90ed4c15844b2e6b6a5a2971ef5f2e.zip
Initial commit
Diffstat (limited to 'cmake/FindFgLib5.cmake')
-rw-r--r--cmake/FindFgLib5.cmake43
1 files changed, 43 insertions, 0 deletions
diff --git a/cmake/FindFgLib5.cmake b/cmake/FindFgLib5.cmake
new file mode 100644
index 0000000..cba0002
--- /dev/null
+++ b/cmake/FindFgLib5.cmake
@@ -0,0 +1,43 @@
+FILE(TO_CMAKE_PATH "$ENV{SISODIR5}" SISODIR5)
+
+IF (FGLIB5_INCLUDE_DIR AND FGLIB5_LIBRARY)
+ SET(FGLIB5_FIND_QUIETLY TRUE)
+ENDIF (FGLIB5_INCLUDE_DIR AND FGLIB5_LIBRARY)
+
+FIND_PATH(FGLIB5_INCLUDE_DIR fgrab_define.h
+ PATHS
+ "$ENV{FGLIB5}/include"
+ "${CMAKE_INSTALL_PREFIX}/include"
+ "${SISODIR5}/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Silicon Software GmbH\\Runtime5;Info]/include"
+)
+
+INCLUDE(SisoLibDir)
+SISO_LIB_DIR("${SISODIR5}/lib" LIB_DIRS COMPILER_LIB_DIR)
+
+FIND_LIBRARY(FGLIB5_LIBRARY NAMES fglib5
+ PATHS
+ "$ENV{FGLIB5}/lib"
+ "$ENV{FGLIB5}"
+ "${CMAKE_INSTALL_PREFIX}/lib"
+ ${LIB_DIRS}
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Silicon Software GmbH\\Runtime5;Info]/lib/${COMPILER_LIB_DIR}"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Silicon Software GmbH\\Runtime5;Info]/lib"
+)
+
+IF(FGLIB5_INCLUDE_DIR AND FGLIB5_LIBRARY)
+ SET(FGLIB5_FOUND TRUE)
+ENDIF(FGLIB5_INCLUDE_DIR AND FGLIB5_LIBRARY)
+
+IF(FGLIB5_FOUND)
+ IF(NOT FGLIB5_FIND_QUIETLY)
+ MESSAGE(STATUS "Found Framegrabber library version 5: ${FGLIB5_LIBRARY}")
+ ENDIF(NOT FGLIB5_FIND_QUIETLY)
+ SET(FGLIB5_LIBRARIES ${FGLIB5_LIBRARY})
+ELSE(FGLIB5_FOUND)
+ IF(FGLIB5_FIND_REQUIRED)
+ IF(NOT FGLIB5_LIBRARY)
+ MESSAGE(FATAL_ERROR "Framegrabber library version 5 not found")
+ ENDIF(NOT FGLIB5_LIBRARY)
+ ENDIF(FGLIB5_FIND_REQUIRED)
+ENDIF(FGLIB5_FOUND)