Merging back 2.3 cmake changes.

This commit is contained in:
Ethan Rublee 2011-06-24 07:12:34 +00:00
parent 42bd52f046
commit 2ee4f0de31

View File

@ -31,22 +31,21 @@ SET(OpenCV_COMPUTE_CAPABILITIES @OpenCV_CUDA_CC@)
# Extract the directory where *this* file has been installed (determined at cmake run-time) # Extract the directory where *this* file has been installed (determined at cmake run-time)
# This variable may or may not be used below, depending on the parsing of OpenCVConfig.cmake # This variable may or may not be used below, depending on the parsing of OpenCVConfig.cmake
get_filename_component(THIS_OPENCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(THIS_OPENCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
#Get the absolute path with no ../.. relative marks, to eliminate implicit linker warnings
get_filename_component(OPENCV_INSTALL_PATH "${THIS_OPENCV_CONFIG_PATH}/../.." REALPATH)
# ====================================================== # ======================================================
# Include directories to add to the user project: # Include directories to add to the user project:
# ====================================================== # ======================================================
# Provide the include directories to the caller # Provide the include directories to the caller
SET(OpenCV_INCLUDE_DIRS @CMAKE_INCLUDE_DIRS_CONFIGCMAKE@) SET(OpenCV_INCLUDE_DIRS "${OPENCV_INSTALL_PATH}/include/opencv;${OPENCV_INSTALL_PATH}/include")
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
# ====================================================== # ======================================================
# Link directories to add to the user project: # Link directories to add to the user project:
# ====================================================== # ======================================================
# Provide the libs directory anyway, it may be needed in some cases. # Provide the libs directory anyway, it may be needed in some cases.
SET(OpenCV_LIB_DIR @CMAKE_LIB_DIRS_CONFIGCMAKE@) SET(OpenCV_LIB_DIR "${OPENCV_INSTALL_PATH}/lib")
LINK_DIRECTORIES(${OpenCV_LIB_DIR}) LINK_DIRECTORIES(${OpenCV_LIB_DIR})