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
9941d3f7
Commit
9941d3f7
authored
Oct 15, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: restore find_package() for build directory
parent
b420c0b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
OpenCVGenConfig.cmake
cmake/OpenCVGenConfig.cmake
+2
-1
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+22
-0
OpenCVConfig.cmake.in
cmake/templates/OpenCVConfig.cmake.in
+2
-1
No files found.
cmake/OpenCVGenConfig.cmake
View file @
9941d3f7
...
...
@@ -74,11 +74,12 @@ if(ANDROID AND NOT BUILD_SHARED_LIBS AND HAVE_TBB)
list
(
APPEND OpenCV2_INCLUDE_DIRS_CONFIGCMAKE
${
TBB_INCLUDE_DIRS
}
)
endif
()
export
(
TARGETS
${
OpenCVModules_TARGETS
}
FILE
"
${
CMAKE_BINARY_DIR
}
/OpenCVModules.cmake"
)
configure_file
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/templates/OpenCVConfig.cmake.in"
"
${
CMAKE_BINARY_DIR
}
/OpenCVConfig.cmake"
IMMEDIATE @ONLY
)
#support for version checking when finding opencv. find_package(OpenCV 2.3.1 EXACT) should now work.
configure_file
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/templates/OpenCVConfig-version.cmake.in"
"
${
CMAKE_BINARY_DIR
}
/OpenCVConfig-version.cmake"
IMMEDIATE @ONLY
)
# --------------------------------------------------------------------------------------------
# Part 2/3: ${BIN_DIR}/unix-install/OpenCVConfig.cmake -> For use *with* "make install"
# -------------------------------------------------------------------------------------------
...
...
cmake/OpenCVUtils.cmake
View file @
9941d3f7
...
...
@@ -440,6 +440,28 @@ endmacro()
function
(
ocv_install_target
)
install
(
TARGETS
${
ARGN
}
)
set
(
isPackage 0
)
unset
(
__package
)
unset
(
__target
)
foreach
(
e
${
ARGN
}
)
if
(
NOT DEFINED __target
)
set
(
__target
"
${
e
}
"
)
endif
()
if
(
isPackage EQUAL 1
)
set
(
__package
"
${
e
}
"
)
break
()
endif
()
if
(
e STREQUAL
"EXPORT"
)
set
(
isPackage 1
)
endif
()
endforeach
()
if
(
DEFINED __package
)
list
(
APPEND
${
__package
}
_TARGETS
${
__target
}
)
list
(
REMOVE_DUPLICATES
${
__package
}
_TARGETS
)
set
(
${
__package
}
_TARGETS
"
${${
__package
}
_TARGETS
}
"
CACHE INTERNAL
"List of
${
__package
}
targets"
)
endif
()
if
(
INSTALL_CREATE_DISTRIB
)
if
(
MSVC AND NOT BUILD_SHARED_LIBS
)
set
(
__target
"
${
ARGV0
}
"
)
...
...
cmake/templates/OpenCVConfig.cmake.in
View file @
9941d3f7
...
...
@@ -289,9 +289,10 @@ endmacro()
# adds include directories in such way that directories from the OpenCV source tree go first
function(ocv_include_directories)
set(__add_before "")
file(TO_CMAKE_PATH "${OpenCV_DIR}" __baseDir)
foreach(dir ${ARGN})
get_filename_component(__abs_dir "${dir}" ABSOLUTE)
if("${__abs_dir}" MATCHES "^${
OpenCV_DIR
}")
if("${__abs_dir}" MATCHES "^${
__baseDir
}")
list(APPEND __add_before "${dir}")
else()
include_directories(AFTER SYSTEM "${dir}")
...
...
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