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
36b34465
Commit
36b34465
authored
Jan 16, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: include contrib modules into opencv_world
parent
9bb5d6ca
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
9 deletions
+35
-9
CMakeLists.txt
CMakeLists.txt
+4
-0
OpenCVGenABI.cmake
cmake/OpenCVGenABI.cmake
+2
-0
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+4
-2
OpenCVPCHSupport.cmake
cmake/OpenCVPCHSupport.cmake
+2
-0
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+7
-0
CMakeLists.txt
modules/stitching/CMakeLists.txt
+1
-1
run_utils.py
modules/ts/misc/run_utils.py
+1
-1
CMakeLists.txt
modules/viz/CMakeLists.txt
+5
-3
CMakeLists.txt
modules/world/CMakeLists.txt
+9
-2
No files found.
CMakeLists.txt
View file @
36b34465
...
...
@@ -76,6 +76,10 @@ if(POLICY CMP0022)
cmake_policy
(
SET CMP0022 OLD
)
endif
()
if
(
POLICY CMP0023
)
cmake_policy
(
SET CMP0023 NEW
)
endif
()
if
(
POLICY CMP0026
)
# silence cmake 3.0+ warnings about reading LOCATION attribute
cmake_policy
(
SET CMP0026 OLD
)
...
...
cmake/OpenCVGenABI.cmake
View file @
36b34465
...
...
@@ -33,11 +33,13 @@ foreach(mod ${OPENCV_MODULES_BUILD})
list
(
APPEND OPENCV_ABI_SKIP_HEADERS
"
${
h
}
"
)
endforeach
()
# libraries
if
(
TARGET opencv_
${
mod
}
)
# opencv_world
set
(
lib_name
""
)
get_target_property
(
lib_name opencv_
${
mod
}
LOCATION
)
get_filename_component
(
lib_name
"
${
lib_name
}
"
NAME
)
list
(
APPEND OPENCV_ABI_SKIP_LIBRARIES
"
${
lib_name
}
"
)
endif
()
endif
()
endforeach
()
string
(
REPLACE
";"
"
\n
"
OPENCV_ABI_SKIP_HEADERS
"
${
OPENCV_ABI_SKIP_HEADERS
}
"
)
string
(
REPLACE
";"
"
\n
"
OPENCV_ABI_SKIP_LIBRARIES
"
${
OPENCV_ABI_SKIP_LIBRARIES
}
"
)
...
...
cmake/OpenCVModule.cmake
View file @
36b34465
...
...
@@ -182,7 +182,7 @@ macro(ocv_add_module _name)
# add self to the world dependencies
if
((
NOT DEFINED OPENCV_MODULE_IS_PART_OF_WORLD
AND NOT OPENCV_MODULE_
${
the_module
}
_CLASS STREQUAL
"BINDINGS"
AND
NOT OPENCV_PROCESSING_EXTRA_MODULES
AND
(
NOT OPENCV_PROCESSING_EXTRA_MODULES OR NOT OPENCV_WORLD_EXCLUDE_EXTRA_MODULES
)
AND
(
NOT BUILD_SHARED_LIBS OR NOT
"x
${
OPENCV_MODULE_TYPE
}
"
STREQUAL
"xSTATIC"
))
OR OPENCV_MODULE_IS_PART_OF_WORLD
)
...
...
@@ -724,8 +724,10 @@ endmacro()
# ocv_create_module(<extra link dependencies>)
# ocv_create_module()
macro
(
ocv_create_module
)
ocv_debug_message
(
"ocv_create_module("
${
ARGN
}
")"
)
ocv_debug_message
(
"
${
the_module
}
: ocv_create_module("
${
ARGN
}
")"
)
if
(
NOT
"
${
ARGN
}
"
STREQUAL
" "
)
set
(
OPENCV_MODULE_
${
the_module
}
_LINK_DEPS
"
${
OPENCV_MODULE_
${
the_module
}
_LINK_DEPS
}
;
${
ARGN
}
"
CACHE INTERNAL
""
)
endif
()
if
(
${
BUILD_opencv_world
}
AND OPENCV_MODULE_
${
the_module
}
_IS_PART_OF_WORLD
)
# nothing
set
(
the_module_target opencv_world
)
...
...
cmake/OpenCVPCHSupport.cmake
View file @
36b34465
...
...
@@ -303,9 +303,11 @@ ENDMACRO(ADD_PRECOMPILED_HEADER)
MACRO
(
GET_NATIVE_PRECOMPILED_HEADER _targetName _input
)
if
(
ENABLE_PRECOMPILED_HEADERS
)
if
(
CMAKE_GENERATOR MATCHES
"^Visual.*$"
)
set
(
${
_targetName
}
_pch
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
_targetName
}
_pch.cpp
)
endif
()
endif
()
ENDMACRO
(
GET_NATIVE_PRECOMPILED_HEADER
)
...
...
cmake/OpenCVUtils.cmake
View file @
36b34465
...
...
@@ -887,7 +887,14 @@ function(ocv_target_link_libraries target)
if
(
";
${
LINK_DEPS
}
;"
MATCHES
";
${
target
}
;"
)
list
(
REMOVE_ITEM LINK_DEPS
"
${
target
}
"
)
# prevent "link to itself" warning (world problem)
endif
()
if
(
NOT TARGET
${
target
}
)
if
(
NOT DEFINED OPENCV_MODULE_
${
target
}
_LOCATION
)
message
(
FATAL_ERROR
"ocv_target_link_libraries: invalid target: '
${
target
}
'"
)
endif
()
set
(
OPENCV_MODULE_
${
target
}
_LINK_DEPS
${
OPENCV_MODULE_
${
target
}
_LINK_DEPS
}
${
LINK_DEPS
}
CACHE INTERNAL
""
FORCE
)
else
()
target_link_libraries
(
${
target
}
${
LINK_DEPS
}
)
endif
()
endfunction
()
function
(
_ocv_append_target_includes target
)
...
...
modules/stitching/CMakeLists.txt
View file @
36b34465
...
...
@@ -5,7 +5,7 @@ if(HAVE_CUDA)
endif
()
set
(
STITCHING_CONTRIB_DEPS
"opencv_xfeatures2d"
)
if
(
BUILD_SHARED_LIBS AND BUILD_opencv_world
)
if
(
BUILD_SHARED_LIBS AND BUILD_opencv_world
AND OPENCV_WORLD_EXCLUDE_EXTRA_MODULES
)
set
(
STITCHING_CONTRIB_DEPS
""
)
endif
()
ocv_define_module
(
stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect
...
...
modules/ts/misc/run_utils.py
View file @
36b34465
...
...
@@ -193,7 +193,7 @@ class CMakeCache:
self
.
tests_dir
=
os
.
path
.
normpath
(
path
)
def
read
(
self
,
path
,
fname
):
rx
=
re
.
compile
(
r'^
opencv_(\w+)_SOURCE_DIR:STATIC
=(.*)$'
)
rx
=
re
.
compile
(
r'^
OPENCV_MODULE_opencv_(\w+)_LOCATION:INTERNAL
=(.*)$'
)
module_paths
=
{}
# name -> path
with
open
(
fname
,
"rt"
)
as
cachefile
:
for
l
in
cachefile
.
readlines
():
...
...
modules/viz/CMakeLists.txt
View file @
36b34465
...
...
@@ -2,12 +2,14 @@ if(NOT WITH_VTK OR NOT DEFINED HAVE_VTK OR NOT HAVE_VTK)
ocv_module_disable
(
viz
)
endif
()
include
(
${
VTK_USE_FILE
}
)
set
(
the_description
"Viz"
)
ocv_define_module
(
viz opencv_core
${
VTK_LIBRARIES
}
WRAP python
)
ocv_define_module
(
viz opencv_core WRAP python
)
include
(
${
VTK_USE_FILE
}
)
ocv_target_link_libraries
(
${
the_module
}
${
VTK_LIBRARIES
}
)
if
(
APPLE AND BUILD_opencv_viz
)
ocv_target_link_libraries
(
opencv_viz
"-framework Cocoa"
)
ocv_target_link_libraries
(
${
the_module
}
"-framework Cocoa"
)
endif
()
if
(
TARGET opencv_test_viz
)
...
...
modules/world/CMakeLists.txt
View file @
36b34465
...
...
@@ -11,6 +11,11 @@ endif()
function
(
include_one_module m
)
include
(
"
${
OPENCV_MODULE_
${
m
}
_LOCATION
}
/CMakeLists.txt"
)
foreach
(
var
CMAKE_CXX_FLAGS CMAKE_C_FLAGS
# Propagate warnings settings
)
set
(
${
var
}
"
${${
var
}}
"
PARENT_SCOPE
)
endforeach
()
endfunction
()
if
(
NOT OPENCV_INITIAL_PASS
)
...
...
@@ -35,12 +40,14 @@ ocv_add_module(world opencv_core)
set
(
headers_list
"HEADERS"
)
set
(
sources_list
"SOURCES"
)
set
(
link_deps
""
)
foreach
(
m
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
)
foreach
(
m
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
opencv_world
)
if
(
OPENCV_MODULE_
${
m
}
_IS_PART_OF_WORLD
)
set
(
headers_list
"
${
headers_list
}
;
${
OPENCV_MODULE_
${
m
}
_HEADERS
}
"
)
set
(
sources_list
"
${
sources_list
}
;
${
OPENCV_MODULE_
${
m
}
_SOURCES
}
"
)
endif
()
set
(
link_deps
"
${
link_deps
}
;
${
OPENCV_MODULE_
${
m
}
_LINK_DEPS
}
"
)
if
(
NOT
"
${
OPENCV_MODULE_
${
m
}
_LINK_DEPS
}
"
STREQUAL
" "
)
list
(
APPEND link_deps
${
OPENCV_MODULE_
${
m
}
_LINK_DEPS
}
)
endif
()
endforeach
()
ocv_glob_module_sources
(
${
headers_list
}
${
sources_list
}
)
...
...
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