2011-08-12 01:59:30 +08:00
|
|
|
# - Find XIMEA
|
|
|
|
# This module finds if XIMEA Software package is installed
|
|
|
|
# and determines where the binaries and header files are.
|
|
|
|
# This code sets the following variables:
|
2012-01-03 21:48:12 +08:00
|
|
|
#
|
2011-08-12 01:59:30 +08:00
|
|
|
# XIMEA_FOUND - True if XIMEA API found
|
|
|
|
# XIMEA_PATH: - Path to the XIMEA API folder
|
2012-01-03 21:48:12 +08:00
|
|
|
# XIMEA_LIBRARY_DIR - XIMEA libraries folder
|
2011-08-12 01:59:30 +08:00
|
|
|
#
|
|
|
|
# Created: 5 Aug 2011 by Marian Zajko (marian.zajko@ximea.com)
|
2012-06-29 01:07:17 +08:00
|
|
|
# Updated: 25 June 2012 by Igor Kuzmin (parafin@ximea.com)
|
2013-06-12 01:17:31 +08:00
|
|
|
# Updated: 22 October 2012 by Marian Zajko (marian.zajko@ximea.com)
|
2011-08-12 01:59:30 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
set(XIMEA_FOUND)
|
|
|
|
set(XIMEA_PATH)
|
|
|
|
set(XIMEA_LIBRARY_DIR)
|
|
|
|
|
2012-01-03 21:48:12 +08:00
|
|
|
if(WIN32)
|
|
|
|
# Try to find the XIMEA API path in registry.
|
|
|
|
GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)
|
2013-08-21 20:44:09 +08:00
|
|
|
|
2013-06-12 01:17:31 +08:00
|
|
|
if(EXISTS ${XIMEA_PATH})
|
2012-01-03 21:48:12 +08:00
|
|
|
set(XIMEA_FOUND 1)
|
|
|
|
# set LIB folders
|
2013-06-12 01:17:31 +08:00
|
|
|
if(CMAKE_CL_64)
|
|
|
|
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x64")
|
|
|
|
else()
|
|
|
|
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x86")
|
|
|
|
endif()
|
2012-06-29 01:07:17 +08:00
|
|
|
else()
|
|
|
|
set(XIMEA_FOUND 0)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
if(EXISTS /opt/XIMEA)
|
|
|
|
set(XIMEA_FOUND 1)
|
|
|
|
# set folders
|
|
|
|
set(XIMEA_PATH /opt/XIMEA/include)
|
2012-01-03 21:48:12 +08:00
|
|
|
else()
|
|
|
|
set(XIMEA_FOUND 0)
|
|
|
|
endif()
|
|
|
|
endif()
|
2011-08-12 01:59:30 +08:00
|
|
|
|
|
|
|
mark_as_advanced(FORCE XIMEA_FOUND)
|
|
|
|
mark_as_advanced(FORCE XIMEA_PATH)
|
2013-08-21 21:26:54 +08:00
|
|
|
mark_as_advanced(FORCE XIMEA_LIBRARY_DIR)
|