summaryrefslogtreecommitdiffstats
path: root/cmake/FindFgLib5.cmake
diff options
context:
space:
mode:
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)