1# - try to find Haption VirtuoseAPI C++ wrapper include files
2#
3# Use of this header depends on the VirtuoseAPI, so we search for that too.
4#
5#  VIRTUOSEVPP_INCLUDE_DIRS, where to find headers
6#  VIRTUOSEVPP_LIBRARIES, the libraries to link against
7#  VIRTUOSEVPP_FOUND, If false, do not try to use this library
8#  VIRTUOSEVPP_RUNTIME_LIBRARY_DIRS, path to DLL/SO for runtime use.
9#  VIRTUOSEAPI_RUNTIME_LIBRARIES, runtime libraries you might want to install
10
11set(VIRTUOSEVPP_ROOT_DIR
12	"${VIRTUOSEVPP_ROOT_DIR}"
13	CACHE
14	PATH
15	"Path to search for VirtuoseAPI VPP wrapper")
16
17find_package(VirtuoseAPI)
18
19find_path(VIRTUOSEVPP_INCLUDE_DIR
20	vpp.h
21	PATHS
22	${_dirs}
23	HINTS
24	"${VIRTUOSEVPP_ROOT_DIR}")
25
26# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if
27# all listed variables are TRUE
28include(FindPackageHandleStandardArgs)
29find_package_handle_standard_args(VirtuoseVPP
30	DEFAULT_MSG
31	VIRTUOSEVPP_INCLUDE_DIR
32	VIRTUOSEAPI_LIBRARY
33	VIRTUOSEAPI_RUNTIME_LIBRARIES
34	VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS
35	VIRTUOSEAPI_INCLUDE_DIR)
36
37if(VIRTUOSEVPP_FOUND)
38	set(VIRTUOSEVPP_LIBRARIES "${VIRTUOSEAPI_LIBRARY}")
39	set(VIRTUOSEVPP_INCLUDE_DIRS
40		"${VIRTUOSEAPI_INCLUDE_DIR}"
41		"${VIRTUOSEVPP_INCLUDE_DIR}")
42	set(VIRTUOSEVPP_RUNTIME_LIBRARIES "${VIRTUOSEAPI_RUNTIME_LIBRARIES}")
43	set(VIRTUOSEVPP_RUNTIME_LIBRARY_DIRS
44		"${VIRTUOSEAPI_RUNTIME_LIBRARY_DIRS}")
45
46	mark_as_advanced(VIRTUOSEVPP_ROOT_DIR)
47endif()
48
49mark_as_advanced(VIRTUOSEVPP_INCLUDE_DIR)
50