Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
0cab986e
Commit
0cab986e
authored
Nov 29, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
applied patches by sigma (ticket #644)
parent
16f50dbe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
9 deletions
+37
-9
CMakeLists.txt
CMakeLists.txt
+29
-5
OpenCVConfig.cmake.in
OpenCVConfig.cmake.in
+8
-4
No files found.
CMakeLists.txt
View file @
0cab986e
...
...
@@ -1068,7 +1068,7 @@ set(CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE "\"\"")
set
(
CMAKE_LIB_DIRS_CONFIGCMAKE
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
#exec_program(${CMAKE_COMMAND} ARGS "-E make_directory \"${CMAKE_BINARY_DIR}/unix-install/\"")
exec_program
(
mkdir ARGS
"-p
\"
${
CMAKE_BINARY_DIR
}
/unix-install/
\"
"
)
exec_program
(
mkdir ARGS
"-p
\"
${
CMAKE_BINARY_DIR
}
/unix-install/
\"
"
OUTPUT_VARIABLE RET_VAL
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/OpenCVConfig.cmake.in"
"
${
CMAKE_BINARY_DIR
}
/unix-install/OpenCVConfig.cmake"
IMMEDIATE @ONLY
)
if
(
UNIX
)
...
...
@@ -1080,18 +1080,42 @@ endif()
# Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages
# -------------------------------------------------------------------------------------------
if
(
WIN32
)
# Set CMAKE_INCLUDE_DIRS_CONFIGCMAKE to the list of include directories:
# support for 3rdparty libraries.
# This will expand to, for example, <program files>/OpenCV 1.1.0/include
set
(
CMAKE_INCLUDE_DIRS_CONFIGCMAKE
"
\"\$
{THIS_OPENCV_CONFIG_PATH}/include
\"
\"\$
{THIS_OPENCV_CONFIG_PATH}/include/opencv
\"
"
)
set
(
CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE
"
\"
${
THIS_OPENCV_CONFIG_PATH
}
\"
"
)
set
(
CMAKE_INCLUDE_DIRS_CONFIGCMAKE
"
\"\$
{THIS_OPENCV_CONFIG_PATH}/include
\"
\"\$
{THIS_OPENCV_CONFIG_PATH}/include/opencv
\"
\"\$
{THIS_OPENCV_CONFIG_PATH}/3rdparty/include
\"
"
)
set
(
CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE
"
\"\$
{THIS_OPENCV_CONFIG_PATH}
\"
"
)
# This will expand to, for example, <program files>/OpenCV 1.1.0/lib
set
(
CMAKE_LIB_DIRS_CONFIGCMAKE
"
\"\$
{THIS_OPENCV_CONFIG_PATH}/lib
\"
"
)
# support for 3rdparty libraries.
set
(
CMAKE_LIB_DIRS_CONFIGCMAKE
"
\"\$
{THIS_OPENCV_CONFIG_PATH}/lib
\"
\"\$
{THIS_OPENCV_CONFIG_PATH}/3rdparty/lib
\"
"
)
#exec_program(${CMAKE_COMMAND} ARGS "-E make_directory \"${CMAKE_BINARY_DIR}/win-install/\"")
exec_program
(
mkdir ARGS
"-p
\"
${
CMAKE_BINARY_DIR
}
/win-install/
\"
"
)
exec_program
(
mkdir ARGS
"-p
\"
${
CMAKE_BINARY_DIR
}
/win-install/
\"
"
OUTPUT_VARIABLE RET_VAL
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/OpenCVConfig.cmake.in"
"
${
CMAKE_BINARY_DIR
}
/win-install/OpenCVConfig.cmake"
IMMEDIATE @ONLY
)
# Configure the OpenCVConfig.cmake file to have the right paths pointing to the install directory
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/OpenCVConfig.cmake.in"
"
${
CMAKE_INSTALL_PREFIX
}
/OpenCVConfig.cmake"
IMMEDIATE @ONLY
)
# if videoInput support is enabled (which is by default on WIN32) copy the static library required to the installation path
# DESTINATION could also be "${CMAKE_INSTALL_PREFIX}/lib") to simplify dev environment setup of client applications
IF
(
HAVE_VIDEOINPUT
)
install
(
FILES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/3rdparty/lib/videoInput.lib"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/3rdparty/lib/videoInput64.lib"
DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
/3rdparty/lib"
)
install
(
FILES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/3rdparty/include/videoInput.h"
DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
/3rdparty/include"
)
ENDIF
()
# Add the OpenCV configuration header to the install path
# Useful for instance if a client application checks against the features OpenCV has been compiled with
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/cvconfig.h"
DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
/include"
)
endif
()
...
...
OpenCVConfig.cmake.in
View file @
0cab986e
...
...
@@ -35,16 +35,20 @@ get_filename_component(THIS_OPENCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH
# ======================================================
# Include directories to add to the user project:
# ======================================================
INCLUDE_DIRECTORIES(@CMAKE_INCLUDE_DIRS_CONFIGCMAKE@)
# Provide the include directories to the caller
SET(OpenCV_INCLUDE_DIRS @CMAKE_INCLUDE_DIRS_CONFIGCMAKE@)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
# ======================================================
# Link directories to add to the user project:
# ======================================================
LINK_DIRECTORIES("@CMAKE_LIB_DIRS_CONFIGCMAKE@")
# Provide the libs directory anyway, it may be needed in some cases.
SET(OpenCV_LIB_DIR "@CMAKE_LIB_DIRS_CONFIGCMAKE@")
SET(OpenCV_LIB_DIR @CMAKE_LIB_DIRS_CONFIGCMAKE@)
LINK_DIRECTORIES(${OpenCV_LIB_DIR})
# ====================================================================
# Link libraries: e.g. opencv_core220.so, opencv_imgproc220d.lib, etc...
...
...
@@ -78,7 +82,7 @@ endif(NOT @CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE@ STREQUAL "")
# many more dependencies:
IF (NOT @OPENCV_BUILD_SHARED_LIB@)
# Under static libs, the user of OpenCV needs access to the 3rdparty libs as well:
LINK_DIRECTORIES("@CMAKE_BINARY_DIR
@/3rdparty/lib")
#LINK_DIRECTORIES(@CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE
@/3rdparty/lib")
SET(OpenCV_LIBS
@OPENCV_LINKER_LIBS@
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment