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
fbe74482
Commit
fbe74482
authored
Oct 09, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: export OpenCVModules for unix 'install', move macros desclarations
parent
bc089bb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
41 deletions
+44
-41
OpenCVConfig.cmake
cmake/OpenCVConfig.cmake
+0
-41
OpenCVGenConfig.cmake
cmake/OpenCVGenConfig.cmake
+2
-0
OpenCVConfig.cmake.in
cmake/templates/OpenCVConfig.cmake.in
+42
-0
No files found.
cmake/OpenCVConfig.cmake
View file @
fbe74482
...
...
@@ -164,44 +164,3 @@ You should manually point CMake variable OpenCV_DIR to your build of OpenCV libr
set
(
OpenCV_FOUND FALSE CACHE BOOL
""
FORCE
)
set
(
OPENCV_FOUND FALSE CACHE BOOL
""
FORCE
)
endif
()
#
# Some macroses for samples
#
macro
(
ocv_check_dependencies
)
set
(
OCV_DEPENDENCIES_FOUND TRUE
)
foreach
(
d
${
ARGN
}
)
if
(
NOT TARGET
${
d
}
)
set
(
OCV_DEPENDENCIES_FOUND FALSE
)
break
()
endif
()
endforeach
()
endmacro
()
# adds include directories in such way that directories from the OpenCV source tree go first
function
(
ocv_include_directories
)
set
(
__add_before
""
)
foreach
(
dir
${
ARGN
}
)
get_filename_component
(
__abs_dir
"
${
dir
}
"
ABSOLUTE
)
if
(
"
${
__abs_dir
}
"
MATCHES
"^
${
OpenCV_DIR
}
"
)
list
(
APPEND __add_before
"
${
dir
}
"
)
else
()
include_directories
(
AFTER SYSTEM
"
${
dir
}
"
)
endif
()
endforeach
()
include_directories
(
BEFORE
${
__add_before
}
)
endfunction
()
macro
(
ocv_include_modules
)
include_directories
(
BEFORE
"
${
OpenCV_INCLUDE_DIRS
}
"
)
endmacro
()
# remove all matching elements from the list
macro
(
ocv_list_filterout lst regex
)
foreach
(
item
${${
lst
}}
)
if
(
item MATCHES
"
${
regex
}
"
)
list
(
REMOVE_ITEM
${
lst
}
"
${
item
}
"
)
endif
()
endforeach
()
endmacro
()
cmake/OpenCVGenConfig.cmake
View file @
fbe74482
...
...
@@ -103,9 +103,11 @@ if(UNIX)
if
(
INSTALL_TO_MANGLED_PATHS
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/unix-install/OpenCVConfig.cmake DESTINATION
${
OPENCV_CONFIG_INSTALL_PATH
}
-
${
OPENCV_VERSION
}
/
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/unix-install/OpenCVConfig-version.cmake DESTINATION
${
OPENCV_CONFIG_INSTALL_PATH
}
-
${
OPENCV_VERSION
}
/
)
install
(
EXPORT OpenCVModules DESTINATION
${
OPENCV_CONFIG_INSTALL_PATH
}
-
${
OPENCV_VERSION
}
/
)
else
()
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/unix-install/OpenCVConfig.cmake"
DESTINATION
${
OPENCV_CONFIG_INSTALL_PATH
}
/
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/unix-install/OpenCVConfig-version.cmake DESTINATION
${
OPENCV_CONFIG_INSTALL_PATH
}
/
)
install
(
EXPORT OpenCVModules DESTINATION
${
OPENCV_CONFIG_INSTALL_PATH
}
/
)
endif
()
endif
()
...
...
cmake/templates/OpenCVConfig.cmake.in
View file @
fbe74482
...
...
@@ -270,3 +270,45 @@ if(CMAKE_CROSSCOMPILING AND OpenCV_SHARED AND (CMAKE_SYSTEM_NAME MATCHES "Linux"
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-rpath-link,${dir}")
endforeach()
endif()
#
# Some macroses for samples
#
macro(ocv_check_dependencies)
set(OCV_DEPENDENCIES_FOUND TRUE)
foreach(d ${ARGN})
if(NOT TARGET ${d})
set(OCV_DEPENDENCIES_FOUND FALSE)
break()
endif()
endforeach()
endmacro()
# adds include directories in such way that directories from the OpenCV source tree go first
function(ocv_include_directories)
set(__add_before "")
foreach(dir ${ARGN})
get_filename_component(__abs_dir "${dir}" ABSOLUTE)
if("${__abs_dir}" MATCHES "^${OpenCV_DIR}")
list(APPEND __add_before "${dir}")
else()
include_directories(AFTER SYSTEM "${dir}")
endif()
endforeach()
include_directories(BEFORE ${__add_before})
endfunction()
macro(ocv_include_modules)
include_directories(BEFORE "${OpenCV_INCLUDE_DIRS}")
endmacro()
# remove all matching elements from the list
macro(ocv_list_filterout lst regex)
foreach(item ${${lst}})
if(item MATCHES "${regex}")
list(REMOVE_ITEM ${lst} "${item}")
endif()
endforeach()
endmacro()
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