-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2061 from taketwo/fix-finder-scripts
Update finder scripts for Ensenso, OpenNI, and OpenNI2
- Loading branch information
Showing
3 changed files
with
123 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,48 @@ | ||
############################################################################### | ||
# - Try to find Ensenso SDK (IDS-Imaging) | ||
# Once done this will define | ||
# ENSENSO_FOUND - System has Ensenso SDK | ||
# ENSENSO_INCLUDE_DIRS - The Ensenso SDK include directories | ||
# ENSENSO_LIBRARIES - The libraries needed to use Ensenso SDK | ||
# ENSENSO_DEFINITIONS - Compiler switches required for using Ensenso SDK | ||
# ----------------------- | ||
# Find Ensenso SDK (IDS-Imaging) | ||
# | ||
# find_package(Ensenso) | ||
# | ||
# Variables defined by this module: | ||
# | ||
# ENSENSO_FOUND True if Ensenso SDK was found | ||
# ENSENSO_INCLUDE_DIRS The location(s) of Ensenso SDK headers | ||
# ENSENSO_LIBRARIES Libraries needed to use Ensenso SDK | ||
|
||
find_path(ENSENSO_INCLUDE_DIR nxLib.h | ||
HINTS ${ENSENSO_ABI_HINT} | ||
/opt/ensenso/development/c | ||
"$ENV{PROGRAMFILES}/Ensenso/development/c" "$ENV{PROGRAMW6432}/Ensenso/development/c" | ||
HINTS "${ENSENSO_ABI_HINT}" | ||
"/opt/ensenso/development/c" | ||
"$ENV{PROGRAMFILES}/Ensenso/development/c" | ||
"$ENV{PROGRAMW6432}/Ensenso/development/c" | ||
PATH_SUFFIXES include/) | ||
|
||
find_library(ENSENSO_LIBRARY QUIET NAMES NxLib64 NxLib32 nxLib64 nxLib32 | ||
HINTS ${ENSENSO_ABI_HINT} | ||
"$ENV{PROGRAMFILES}/Ensenso/development/c" "$ENV{PROGRAMW6432}/Ensenso/development/c" | ||
find_library(ENSENSO_LIBRARY QUIET | ||
NAMES NxLib64 NxLib32 nxLib64 nxLib32 | ||
HINTS "${ENSENSO_ABI_HINT}" | ||
"$ENV{PROGRAMFILES}/Ensenso/development/c" | ||
"$ENV{PROGRAMW6432}/Ensenso/development/c" | ||
PATH_SUFFIXES lib/) | ||
|
||
set(ENSENSO_LIBRARIES ${ENSENSO_LIBRARY}) | ||
set(ENSENSO_INCLUDE_DIRS ${ENSENSO_INCLUDE_DIR}) | ||
if(ENSENSO_INCLUDE_DIR AND ENSENSO_LIBRARY) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
# handle the QUIETLY and REQUIRED arguments and set ENSENSO_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
find_package_handle_standard_args(ensenso DEFAULT_MSG | ||
ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR) | ||
# Include directories | ||
set(ENSENSO_INCLUDE_DIRS ${ENSENSO_INCLUDE_DIR}) | ||
unset(ENSENSO_INCLUDE_DIR) | ||
mark_as_advanced(ENSENSO_INCLUDE_DIRS) | ||
|
||
mark_as_advanced(ENSENSO_INCLUDE_DIR ENSENSO_LIBRARY) | ||
# Libraries | ||
set(ENSENSO_LIBRARIES ${ENSENSO_LIBRARY}) | ||
unset(ENSENSO_LIBRARY) | ||
mark_as_advanced(ENSENSO_LIBRARIES) | ||
|
||
if(ENSENSO_FOUND) | ||
message(STATUS "Ensenso SDK found") | ||
endif(ENSENSO_FOUND) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(ENSENSO | ||
FOUND_VAR ENSENSO_FOUND | ||
REQUIRED_VARS ENSENSO_LIBRARIES ENSENSO_INCLUDE_DIRS | ||
) | ||
|
||
if(ENSENSO_FOUND) | ||
message(STATUS "Ensenso found (include: ${ENSENSO_INCLUDE_DIRS}, lib: ${ENSENSO_LIBRARIES})") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters