|
@@ -1,45 +1,27 @@
|
|
|
# Filename: FindVRPN.cmake
|
|
# Filename: FindVRPN.cmake
|
|
|
-# Author: kestred (29 Nov, 2013)
|
|
|
|
|
|
|
+# Authors: CFSworks (2 Nov, 2018)
|
|
|
#
|
|
#
|
|
|
# Usage:
|
|
# Usage:
|
|
|
# find_package(VRPN [REQUIRED] [QUIET])
|
|
# find_package(VRPN [REQUIRED] [QUIET])
|
|
|
#
|
|
#
|
|
|
-# It sets the following variables:
|
|
|
|
|
-# VRPN_FOUND - system has libvrpn
|
|
|
|
|
-# VRPN_INCLUDE_DIR - the vrpn include directory
|
|
|
|
|
-# VRPN_LIBRARY_DIR - the vrpn library directory
|
|
|
|
|
-# VRPN_LIBRARY - the path to the library binary
|
|
|
|
|
|
|
+# Once done this will define:
|
|
|
|
|
+# VRPN_FOUND - system has VRPN
|
|
|
|
|
+# VRPN_INCLUDE_DIR - the include directory containing VRPN header files
|
|
|
|
|
+# VRPN_LIBRARY - the path to the VRPN client library
|
|
|
#
|
|
#
|
|
|
|
|
|
|
|
-if(VRPN_INCLUDE_DIR AND VRPN_LIBRARY_DIR)
|
|
|
|
|
- set(FOUND_VRPN TRUE)
|
|
|
|
|
-else()
|
|
|
|
|
- # Find the vrpn include files
|
|
|
|
|
- find_path(VRPN_INCLUDE_DIR
|
|
|
|
|
- NAMES "vrpn_Keyboard.h"
|
|
|
|
|
- PATHS "/usr/include"
|
|
|
|
|
- "/usr/local/include"
|
|
|
|
|
- "/opt/vrpn/include"
|
|
|
|
|
- PATH_SUFFIXES "" "vrpn"
|
|
|
|
|
- DOC "The path to vrpn's include directory."
|
|
|
|
|
- )
|
|
|
|
|
|
|
+if(NOT VRPN_INCLUDE_DIR)
|
|
|
|
|
+ find_path(VRPN_INCLUDE_DIR "vrpn_Connection.h")
|
|
|
|
|
|
|
|
- # Find the libvrpn library (.a, .so)
|
|
|
|
|
- find_library(VRPN_LIBRARY
|
|
|
|
|
- NAMES "vrpn"
|
|
|
|
|
- "libvrpn"
|
|
|
|
|
- PATHS "/usr"
|
|
|
|
|
- "/usr/local"
|
|
|
|
|
- "/opt/vrpn"
|
|
|
|
|
- PATH_SUFFIXES "lib" "lib32" "lib64"
|
|
|
|
|
- )
|
|
|
|
|
- get_filename_component(VRPN_LIBRARY_DIR "${VRPN_LIBRARY}" PATH)
|
|
|
|
|
- set(VRPN_LIBRARY_DIR "${VRPN_LIBRARY_DIR}" CACHE PATH "The path to vrpn's library directory.") # Library path
|
|
|
|
|
|
|
+ mark_as_advanced(VRPN_INCLUDE_DIR)
|
|
|
|
|
+endif()
|
|
|
|
|
+
|
|
|
|
|
+if(NOT VRPN_LIBRARY)
|
|
|
|
|
+ find_library(VRPN_LIBRARY
|
|
|
|
|
+ NAMES "vrpn")
|
|
|
|
|
|
|
|
- mark_as_advanced(VRPN_INCLUDE_DIR)
|
|
|
|
|
- mark_as_advanced(VRPN_LIBRARY_DIR)
|
|
|
|
|
- mark_as_advanced(VRPN_LIBRARY)
|
|
|
|
|
|
|
+ mark_as_advanced(VRPN_LIBRARY)
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
include(FindPackageHandleStandardArgs)
|
|
|
-find_package_handle_standard_args(VRPN DEFAULT_MSG VRPN_LIBRARY VRPN_INCLUDE_DIR VRPN_LIBRARY_DIR)
|
|
|
|
|
|
|
+find_package_handle_standard_args(VRPN DEFAULT_MSG VRPN_INCLUDE_DIR VRPN_LIBRARY)
|