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
3d665911
Commit
3d665911
authored
Feb 02, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fix includes processing
parent
403c3c3d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
22 deletions
+17
-22
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+11
-16
CMakeLists.txt
modules/cudev/CMakeLists.txt
+1
-1
CMakeLists.txt
modules/dnn/CMakeLists.txt
+5
-5
No files found.
cmake/OpenCVModule.cmake
View file @
3d665911
...
...
@@ -164,7 +164,7 @@ macro(ocv_add_module _name)
set
(
OPENCV_MODULE_
${
the_module
}
_LINK_DEPS
""
CACHE INTERNAL
""
)
# parse list of dependencies
if
(
"
${
ARGV1
}
"
STREQUAL
"INTERNAL"
OR
"
${
ARGV1
}
"
STREQUAL
"
BINDINGS"
)
if
(
"
${
ARGV1
}
"
STREQUAL
" INTERNAL"
OR
"
${
ARGV1
}
"
STREQUAL
"
BINDINGS"
)
set
(
OPENCV_MODULE_
${
the_module
}
_CLASS
"
${
ARGV1
}
"
CACHE INTERNAL
"The category of the module"
)
set
(
__ocv_argn__
${
ARGN
}
)
list
(
REMOVE_AT __ocv_argn__ 0
)
...
...
@@ -257,7 +257,7 @@ endmacro()
# Usage: _glob_locations(<output paths list> <output names list> <folder> [<folder> ...])
function
(
_glob_locations out_paths out_names
)
foreach
(
path
${
ARGN
}
)
message
(
STATUS
"Inspect:
${
path
}
"
)
#
message(STATUS "Inspect: ${path}")
list
(
LENGTH paths before
)
get_filename_component
(
path
"
${
path
}
"
ABSOLUTE
)
# Either module itself
...
...
@@ -269,7 +269,7 @@ function(_glob_locations out_paths out_names)
# Either flat collection of modules
file
(
GLOB subdirs RELATIVE
"
${
path
}
"
"
${
path
}
/*"
)
foreach
(
subdir
${
subdirs
}
)
message
(
STATUS
"Inspect:
${
path
}
/
${
subdir
}
"
)
#
message(STATUS "Inspect: ${path}/${subdir}")
if
(
EXISTS
"
${
path
}
/
${
subdir
}
/CMakeLists.txt"
)
list
(
APPEND paths
"
${
path
}
/
${
subdir
}
"
)
list
(
APPEND names
"
${
subdir
}
"
)
...
...
@@ -302,7 +302,7 @@ function(_add_modules_1 paths names)
foreach
(
i RANGE
${
len
}
)
list
(
GET
${
paths
}
${
i
}
path
)
list
(
GET
${
names
}
${
i
}
name
)
message
(
STATUS
"First pass:
${
name
}
=>
${
path
}
"
)
#
message(STATUS "First pass: ${name} => ${path}")
include
(
"
${
path
}
/cmake/init.cmake"
OPTIONAL
)
add_subdirectory
(
"
${
path
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/.firstpass/
${
name
}
"
)
endforeach
()
...
...
@@ -320,7 +320,7 @@ function(_add_modules_2)
message
(
WARNING
"Incorrect module name:
${
m
}
"
)
endif
()
string
(
REGEX REPLACE
"^opencv_"
""
name
"
${
m
}
"
)
message
(
STATUS
"Second pass:
${
name
}
=>
${
OPENCV_MODULE_
${
m
}
_LOCATION
}
"
)
#
message(STATUS "Second pass: ${name} => ${OPENCV_MODULE_${m}_LOCATION}")
add_subdirectory
(
"
${
OPENCV_MODULE_
${
m
}
_LOCATION
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
name
}
"
)
endif
()
endforeach
()
...
...
@@ -427,7 +427,7 @@ function(__ocv_sort_modules_by_deps __lst)
break
()
endif
()
else
()
message
(
FATAL_ERROR
WARNING
"
Unresolved dependencies or loop in dependency graph (
${
length_after
}
)
\n
"
message
(
FATAL_ERROR
"FATAL:
Unresolved dependencies or loop in dependency graph (
${
length_after
}
)
\n
"
"Processed
${
__lst
}
:
${${
__lst
}}
\n
"
"Good modules:
${
result
}
\n
"
"Bad modules:
${
input
}
"
...
...
@@ -652,12 +652,14 @@ endmacro()
# setup include paths for the list of passed modules
macro
(
ocv_target_include_modules target
)
foreach
(
d
${
ARGN
}
)
if
(
d MATCHES
"^opencv_"
AND HAVE_
${
d
}
)
if
(
EXISTS
"
${
OPENCV_MODULE_
${
d
}
_LOCATION
}
/include"
)
if
(
d MATCHES
"^opencv_"
)
if
(
HAVE_
${
d
}
AND
EXISTS
"
${
OPENCV_MODULE_
${
d
}
_LOCATION
}
/include"
)
ocv_target_include_directories
(
${
target
}
"
${
OPENCV_MODULE_
${
d
}
_LOCATION
}
/include"
)
endif
()
elseif
(
EXISTS
"
${
d
}
"
)
ocv_target_include_directories
(
${
target
}
"
${
d
}
"
)
else
()
message
(
WARNING
"Unexpected include:
${
d
}
(module=
${
the_module
}
)"
)
endif
()
endforeach
()
endmacro
()
...
...
@@ -686,14 +688,7 @@ macro(ocv_module_include_directories)
"
${
OPENCV_MODULE_
${
the_module
}
_LOCATION
}
/src"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
# for precompiled headers
)
foreach
(
arg
${
ARGN
}
)
if
(
IS_ABSOLUTE
"
${
arg
}
"
)
list
(
APPEND incs
"
${
arg
}
"
)
else
()
list
(
APPEND incs
"
${
OPENCV_MODULE_
${
the_module
}
_LOCATION
}
/
${
arg
}
"
)
endif
()
endforeach
()
ocv_target_include_modules
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
incs
}
)
ocv_target_include_modules
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
ARGN
}
)
endmacro
()
...
...
modules/cudev/CMakeLists.txt
View file @
3d665911
...
...
@@ -8,7 +8,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4189 /wd4505 -Wundef -Wmissing-declarati
ocv_add_module
(
cudev
)
ocv_module_include_directories
(
opencv_core
opencv_hal
)
ocv_module_include_directories
(
opencv_core
)
file
(
GLOB_RECURSE lib_hdrs
"
${
CMAKE_CURRENT_LIST_DIR
}
/include/opencv2/
${
name
}
/*.hpp"
)
file
(
GLOB lib_srcs
"
${
CMAKE_CURRENT_LIST_DIR
}
/src/*.cpp"
)
...
...
modules/dnn/CMakeLists.txt
View file @
3d665911
...
...
@@ -53,16 +53,16 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS
)
if
(
PROTOBUF_UPDATE_FILES
)
file
(
GLOB proto_files
"
${
CMAKE_CURRENT_
SOURCE_DIR
}
/src/tensorflow/*.proto"
"
${
CMAKE_CURRENT_SOURCE
_DIR
}
/src/caffe/opencv-caffe.proto"
)
file
(
GLOB proto_files
"
${
CMAKE_CURRENT_
LIST_DIR
}
/src/tensorflow/*.proto"
"
${
CMAKE_CURRENT_LIST
_DIR
}
/src/caffe/opencv-caffe.proto"
)
set
(
PROTOBUF_GENERATE_CPP_APPEND_PATH ON
)
# required for tensorflow
protobuf_generate_cpp
(
fw_srcs fw_hdrs
${
proto_files
}
)
else
()
file
(
GLOB fw_srcs
"
${
CMAKE_CURRENT_
SOURCE_DIR
}
/misc/tensorflow/*.cc"
"
${
CMAKE_CURRENT_SOURCE
_DIR
}
/misc/caffe/opencv-caffe.pb.cc"
)
file
(
GLOB fw_hdrs
"
${
CMAKE_CURRENT_
SOURCE_DIR
}
/misc/tensorflow/*.h"
"
${
CMAKE_CURRENT_SOURCE
_DIR
}
/misc/caffe/opencv-caffe.pb.h"
)
set
(
fw_inc
"
misc/caffe"
"
misc/tensorflow"
)
file
(
GLOB fw_srcs
"
${
CMAKE_CURRENT_
LIST_DIR
}
/misc/tensorflow/*.cc"
"
${
CMAKE_CURRENT_LIST
_DIR
}
/misc/caffe/opencv-caffe.pb.cc"
)
file
(
GLOB fw_hdrs
"
${
CMAKE_CURRENT_
LIST_DIR
}
/misc/tensorflow/*.h"
"
${
CMAKE_CURRENT_LIST
_DIR
}
/misc/caffe/opencv-caffe.pb.h"
)
set
(
fw_inc
"
${
CMAKE_CURRENT_LIST_DIR
}
/misc/caffe"
"
${
CMAKE_CURRENT_LIST_DIR
}
/
misc/tensorflow"
)
endif
()
ocv_module_include_directories
(
${
fw_inc
}
src/ocl4dnn/include
${
OPENCL_INCLUDE_DIRS
}
)
ocv_module_include_directories
(
${
fw_inc
}
${
CMAKE_CURRENT_LIST_DIR
}
/
src/ocl4dnn/include
${
OPENCL_INCLUDE_DIRS
}
)
ocv_glob_module_sources
(
SOURCES
${
fw_srcs
}
)
ocv_create_module
(
libprotobuf
${
LAPACK_LIBRARIES
}
)
ocv_add_samples
()
...
...
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