Debian Codegraph @

cmake_modules/FindPLAYERONE.cmake

raw
1 # - Try to find PlayerOne Library
2 # Once done this will define
3 #
4 # PLAYERONE_FOUND - system has PLAYERONE
5 # PLAYERONE_INCLUDE_DIR - the PLAYERONE include directory
6 # PLAYERONE_LIBRARIES - Link these to use ASI
7
8 # Redistribution and use is allowed according to the terms of the BSD license.
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10
11 if (PLAYERONE_INCLUDE_DIR AND PLAYERONE_LIBRARIES)
12
13 # in cache already
14 set(PLAYERONE_FOUND TRUE)
15 message(STATUS "Found libplayerone: ${PLAYERONE_LIBRARIES}")
16
17 else (PLAYERONE_INCLUDE_DIR AND PLAYERONE_LIBRARIES)
18
19 find_path(PLAYERONE_INCLUDE_DIR PlayerOneCamera.h
20 PATH_SUFFIXES libplayerone
21 ${_obIncDir}
22 ${GNUWIN32_DIR}/include
23 )
24
25 find_library(PLAYERONECAM_LIBRARIES NAMES PlayerOneCamera
26 PATHS
27 ${_obLinkDir}
28 ${GNUWIN32_DIR}/lib
29 )
30
31
32 if (PLAYERONECAM_LIBRARIES)
33 set(PLAYERONE_LIBRARIES ${PLAYERONECAM_LIBRARIES})
34 endif (PLAYERONECAM_LIBRARIES)
35
36
37 if(PLAYERONE_INCLUDE_DIR AND PLAYERONE_LIBRARIES)
38 set(PLAYERONE_FOUND TRUE)
39 else (PLAYERONE_INCLUDE_DIR AND PLAYERONE_LIBRARIES)
40 set(PLAYERONE_FOUND FALSE)
41 endif(PLAYERONE_INCLUDE_DIR AND PLAYERONE_LIBRARIES)
42
43
44 if (PLAYERONE_FOUND)
45 if (NOT PLAYERONE_FIND_QUIETLY)
46 message(STATUS "Found PLAYERONE: ${PLAYERONE_LIBRARIES}")
47 endif (NOT PLAYERONE_FIND_QUIETLY)
48 else (PLAYERONE_FOUND)
49 if (PLAYERONE_FIND_REQUIRED)
50 message(FATAL_ERROR "PLAYERONE not found. Please install libPlayerOneCamera.3 http://www.indilib.org")
51 endif (PLAYERONE_FIND_REQUIRED)
52 endif (PLAYERONE_FOUND)
53
54 mark_as_advanced(PLAYERONE_INCLUDE_DIR PLAYERONE_LIBRARIES)
55
56 endif (PLAYERONE_INCLUDE_DIR AND PLAYERONE_LIBRARIES)