moved an include dirs setting to the root cmake file

This commit is contained in:
Maria Dimashova 2011-02-03 09:55:17 +00:00
parent 6590711b8b
commit ed77955635
2 changed files with 19 additions and 14 deletions

View File

@ -782,18 +782,29 @@ if(WITH_OPENNI)
unset(OPENNI_LIBRARY CACHE)
unset(PRIME_SENSOR_MODULES_FOR_OPENNI CACHE)
find_library(OPENNI_LIBRARY "OpenNI" PATHS "/usr/lib" "c:/Program Files/OpenNI/Lib" DOC "OpenNI library")
if(OPENNI_LIBRARY)
if(OPENNI_LIBRARY)
set(HAVE_OPENNI TRUE)
# set OpenNI include directory
if(WIN32)
set(OPENNI_INCLUDE_DIR "c:/Program Files/OpenNI/Include")
elseif(UNIX OR APPLE)
set(OPENNI_INCLUDE_DIR "/usr/include/ni")
endif()
# the check: are PrimeSensor Modules for OpenNI installed?
if(WIN32)
find_file(PRIME_SENSOR_MODULES_FOR_OPENNI "XnCore.dll" PATHS "c:/Program Files/Prime Sense/Sensor/Bin" DOC "Core library of PrimeSensor Modules for OpenNI")
elseif(UNIX OR APPLE)
find_library(PRIME_SENSOR_MODULES_FOR_OPENNI "XnCore" PATHS "/usr/lib" DOC "Core library of PrimeSensor Modules for OpenNI")
endif()
if(PRIME_SENSOR_MODULES_FOR_OPENNI)
if(WIN32)
find_file(PRIME_SENSOR_MODULES_FOR_OPENNI "XnCore.dll" PATHS "c:/Program Files/Prime Sense/Sensor/Bin" DOC "Core library of PrimeSensor Modules for OpenNI")
elseif(UNIX OR APPLE)
find_library(PRIME_SENSOR_MODULES_FOR_OPENNI "XnCore" PATHS "/usr/lib" DOC "Core library of PrimeSensor Modules for OpenNI")
endif()
if(PRIME_SENSOR_MODULES_FOR_OPENNI)
set(HAVE_PRIME_SENSOR_FOR_OPENNI TRUE)
endif()
endif()
endif() #if(OPENNI_LIBRARY)
endif() #if(WITH_OPENNI)
############################## Eigen2 ##############################

View File

@ -177,12 +177,6 @@ endif()
#OpenNI
if(WITH_OPENNI AND HAVE_OPENNI)
set(highgui_srcs ${highgui_srcs} src/cap_openni.cpp)
if(WIN32)
set(OPENNI_INCLUDE_DIR "c:/Program Files/OpenNI/Include")
elseif(UNIX OR APPLE)
set(OPENNI_INCLUDE_DIR "/usr/include/ni")
endif()
include_directories(${OPENNI_INCLUDE_DIR})
endif()