File: OpenCVFindXimea.cmake

package info (click to toggle)
opencv 2.4.9.1%2Bdfsg-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 126,800 kB
  • ctags: 62,729
  • sloc: xml: 509,055; cpp: 490,794; lisp: 23,208; python: 21,174; java: 19,317; ansic: 1,038; sh: 128; makefile: 72
file content (46 lines) | stat: -rw-r--r-- 1,273 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# - 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:
#
#  XIMEA_FOUND          - True if XIMEA API found
#  XIMEA_PATH:          - Path to the XIMEA API folder
#  XIMEA_LIBRARY_DIR    - XIMEA libraries folder
#
# Created: 5 Aug 2011 by Marian Zajko (marian.zajko@ximea.com)
# Updated: 25 June 2012 by Igor Kuzmin (parafin@ximea.com)
# Updated: 22 October 2012 by Marian Zajko (marian.zajko@ximea.com)
#

set(XIMEA_FOUND)
set(XIMEA_PATH)
set(XIMEA_LIBRARY_DIR)

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)

  if(EXISTS ${XIMEA_PATH})
    set(XIMEA_FOUND 1)
    # set LIB folders
    if(X86_64)
      set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x64")
    else()
      set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x86")
    endif()
  else()
    set(XIMEA_FOUND 0)
  endif()
else()
  if(EXISTS /opt/XIMEA)
    set(XIMEA_FOUND 1)
    # set folders
    set(XIMEA_PATH /opt/XIMEA/include)
  else()
    set(XIMEA_FOUND 0)
  endif()
endif()

mark_as_advanced(FORCE XIMEA_FOUND)
mark_as_advanced(FORCE XIMEA_PATH)
mark_as_advanced(FORCE XIMEA_LIBRARY_DIR)