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
b6949c50
Commit
b6949c50
authored
Aug 16, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: CMP0022 NEW
parent
870d9502
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
33 additions
and
72 deletions
+33
-72
CMakeLists.txt
CMakeLists.txt
+0
-8
FindCUDA.cmake
cmake/FindCUDA.cmake
+6
-6
OpenCVDetectAndroidSDK.cmake
cmake/OpenCVDetectAndroidSDK.cmake
+1
-1
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+9
-29
CMakeLists.txt
modules/core/CMakeLists.txt
+2
-2
CMakeLists.txt
modules/cudev/test/CMakeLists.txt
+3
-1
CMakeLists.txt
modules/highgui/CMakeLists.txt
+0
-5
CMakeLists.txt
modules/imgcodecs/CMakeLists.txt
+0
-3
CMakeLists.txt
modules/java/CMakeLists.txt
+7
-7
common.cmake
modules/python/common.cmake
+3
-3
CMakeLists.txt
modules/videoio/CMakeLists.txt
+0
-5
CMakeLists.txt
modules/viz/CMakeLists.txt
+2
-2
No files found.
CMakeLists.txt
View file @
b6949c50
...
...
@@ -77,14 +77,6 @@ if(WINRT)
endif
()
endif
()
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/FindCUDA.cmake
View file @
b6949c50
...
...
@@ -1556,7 +1556,7 @@ macro(CUDA_ADD_LIBRARY cuda_target)
# variable will have been defined.
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS
(
"
${
link_file
}
"
${
cuda_target
}
"
${
_options
}
"
"
${${
cuda_target
}
_SEPARABLE_COMPILATION_OBJECTS
}
"
)
target_link_libraries
(
${
cuda_target
}
target_link_libraries
(
${
cuda_target
}
LINK_PRIVATE
${
CUDA_LIBRARIES
}
)
...
...
@@ -1600,7 +1600,7 @@ macro(CUDA_ADD_EXECUTABLE cuda_target)
# variable will have been defined.
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS
(
"
${
link_file
}
"
${
cuda_target
}
"
${
_options
}
"
"
${${
cuda_target
}
_SEPARABLE_COMPILATION_OBJECTS
}
"
)
target_link_libraries
(
${
cuda_target
}
target_link_libraries
(
${
cuda_target
}
LINK_PRIVATE
${
CUDA_LIBRARIES
}
)
...
...
@@ -1675,9 +1675,9 @@ endmacro()
###############################################################################
macro
(
CUDA_ADD_CUFFT_TO_TARGET target
)
if
(
CUDA_BUILD_EMULATION
)
target_link_libraries
(
${
target
}
${
CUDA_cufftemu_LIBRARY
}
)
target_link_libraries
(
${
target
}
LINK_PRIVATE
${
CUDA_cufftemu_LIBRARY
}
)
else
()
target_link_libraries
(
${
target
}
${
CUDA_cufft_LIBRARY
}
)
target_link_libraries
(
${
target
}
LINK_PRIVATE
${
CUDA_cufft_LIBRARY
}
)
endif
()
endmacro
()
...
...
@@ -1688,9 +1688,9 @@ endmacro()
###############################################################################
macro
(
CUDA_ADD_CUBLAS_TO_TARGET target
)
if
(
CUDA_BUILD_EMULATION
)
target_link_libraries
(
${
target
}
${
CUDA_cublasemu_LIBRARY
}
)
target_link_libraries
(
${
target
}
LINK_PRIVATE
${
CUDA_cublasemu_LIBRARY
}
)
else
()
target_link_libraries
(
${
target
}
${
CUDA_cublas_LIBRARY
}
)
target_link_libraries
(
${
target
}
LINK_PRIVATE
${
CUDA_cublas_LIBRARY
}
)
endif
()
endmacro
()
...
...
cmake/OpenCVDetectAndroidSDK.cmake
View file @
b6949c50
...
...
@@ -290,7 +290,7 @@ macro(add_android_project target path)
add_library
(
${
JNI_LIB_NAME
}
SHARED
${
android_proj_jni_files
}
)
ocv_target_include_modules_recurse
(
${
JNI_LIB_NAME
}
${
android_proj_NATIVE_DEPS
}
)
ocv_target_include_directories
(
${
JNI_LIB_NAME
}
"
${
path
}
/jni"
)
ocv_target_link_libraries
(
${
JNI_LIB_NAME
}
${
OPENCV_LINKER_LIBS
}
${
android_proj_NATIVE_DEPS
}
)
ocv_target_link_libraries
(
${
JNI_LIB_NAME
}
LINK_PRIVATE
${
OPENCV_LINKER_LIBS
}
${
android_proj_NATIVE_DEPS
}
)
set_target_properties
(
${
JNI_LIB_NAME
}
PROPERTIES
OUTPUT_NAME
"
${
JNI_LIB_NAME
}
"
...
...
cmake/OpenCVModule.cmake
View file @
b6949c50
...
...
@@ -787,15 +787,12 @@ macro(_ocv_create_module)
endif
()
set
(
sub_objs
""
)
set
(
sub_links
""
)
set
(
cuda_objs
""
)
if
(
OPENCV_MODULE_
${
the_module
}
_CHILDREN
)
message
(
STATUS
"Complex module
${
the_module
}
"
)
foreach
(
m
${
OPENCV_MODULE_
${
the_module
}
_CHILDREN
}
)
if
(
BUILD_
${
m
}
AND TARGET
${
m
}
_object
)
get_target_property
(
_sub_links
${
m
}
LINK_LIBRARIES
)
list
(
APPEND sub_objs $<TARGET_OBJECTS:
${
m
}
_object>
)
list
(
APPEND sub_links
${
_sub_links
}
)
message
(
STATUS
" +
${
m
}
"
)
else
()
message
(
STATUS
" -
${
m
}
"
)
...
...
@@ -837,38 +834,21 @@ macro(_ocv_create_module)
)
if
(
cuda_objs
)
target_link_libraries
(
${
the_module
}
${
cuda_objs
}
)
endif
()
# TODO: is it needed?
if
(
sub_links
)
ocv_list_filterout
(
sub_links
"^opencv_"
)
ocv_list_unique
(
sub_links
)
target_link_libraries
(
${
the_module
}
${
sub_links
}
)
target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
cuda_objs
}
)
endif
()
unset
(
sub_objs
)
unset
(
sub_links
)
unset
(
cuda_objs
)
set_target_properties
(
${
the_module
}
PROPERTIES LABELS
"
${
OPENCV_MODULE_
${
the_module
}
_LABEL
}
;Module"
)
set_source_files_properties
(
${
OPENCV_MODULE_
${
the_module
}
_HEADERS
}
${
OPENCV_MODULE_
${
the_module
}
_SOURCES
}
${${
the_module
}
_pch
}
PROPERTIES LABELS
"
${
OPENCV_MODULE_
${
the_module
}
_LABEL
}
;Module"
)
if
(
NOT BUILD_SHARED_LIBS OR NOT INSTALL_CREATE_DISTRIB
)
ocv_target_link_libraries
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS_TO_LINK
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_INTERFACE_LIBRARIES
${
OPENCV_MODULE_
${
the_module
}
_DEPS_TO_LINK
}
)
ocv_target_link_libraries
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS_EXT
}
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBS
}
${
ARGN
}
)
if
(
HAVE_CUDA
)
ocv_target_link_libraries
(
${
the_module
}
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
endif
()
else
()
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
OPENCV_MODULE_
${
the_module
}
_DEPS_TO_LINK
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
OPENCV_MODULE_
${
the_module
}
_DEPS_TO_LINK
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
OPENCV_MODULE_
${
the_module
}
_DEPS_EXT
}
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBS
}
${
ARGN
}
)
if
(
HAVE_CUDA
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
endif
()
ocv_target_link_libraries
(
${
the_module
}
LINK_PUBLIC
${
OPENCV_MODULE_
${
the_module
}
_DEPS_TO_LINK
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PUBLIC
${
OPENCV_MODULE_
${
the_module
}
_DEPS_EXT
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
OPENCV_LINKER_LIBS
}
${
OPENCV_HAL_LINKER_LIBS
}
${
IPP_LIBS
}
${
ARGN
}
)
if
(
HAVE_CUDA
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
endif
()
add_dependencies
(
opencv_modules
${
the_module
}
)
...
...
@@ -1074,7 +1054,7 @@ function(ocv_add_perf_tests)
source_group
(
"Src"
FILES
"
${${
the_target
}
_pch
}
"
)
ocv_add_executable
(
${
the_target
}
${
OPENCV_PERF_
${
the_module
}
_SOURCES
}
${${
the_target
}
_pch
}
)
ocv_target_include_modules
(
${
the_target
}
${
perf_deps
}
"
${
perf_path
}
"
)
ocv_target_link_libraries
(
${
the_target
}
${
perf_deps
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
ocv_target_link_libraries
(
${
the_target
}
LINK_PRIVATE
${
perf_deps
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
add_dependencies
(
opencv_perf_tests
${
the_target
}
)
set_target_properties
(
${
the_target
}
PROPERTIES LABELS
"
${
OPENCV_MODULE_
${
the_module
}
_LABEL
}
;PerfTest"
)
...
...
@@ -1151,7 +1131,7 @@ function(ocv_add_accuracy_tests)
source_group
(
"Src"
FILES
"
${${
the_target
}
_pch
}
"
)
ocv_add_executable
(
${
the_target
}
${
OPENCV_TEST_
${
the_module
}
_SOURCES
}
${${
the_target
}
_pch
}
)
ocv_target_include_modules
(
${
the_target
}
${
test_deps
}
"
${
test_path
}
"
)
ocv_target_link_libraries
(
${
the_target
}
${
test_deps
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
ocv_target_link_libraries
(
${
the_target
}
LINK_PRIVATE
${
test_deps
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
add_dependencies
(
opencv_tests
${
the_target
}
)
set_target_properties
(
${
the_target
}
PROPERTIES LABELS
"
${
OPENCV_MODULE_
${
the_module
}
_LABEL
}
;AccuracyTest"
)
...
...
@@ -1208,7 +1188,7 @@ function(ocv_add_samples)
ocv_add_executable
(
${
the_target
}
"
${
source
}
"
)
ocv_target_include_modules
(
${
the_target
}
${
samples_deps
}
)
ocv_target_link_libraries
(
${
the_target
}
${
samples_deps
}
)
ocv_target_link_libraries
(
${
the_target
}
LINK_PRIVATE
${
samples_deps
}
)
set_target_properties
(
${
the_target
}
PROPERTIES PROJECT_LABEL
"(sample)
${
name
}
"
)
set_target_properties
(
${
the_target
}
PROPERTIES LABELS
"
${
OPENCV_MODULE_
${
the_module
}
_LABEL
}
;Sample"
)
...
...
modules/core/CMakeLists.txt
View file @
b6949c50
...
...
@@ -4,7 +4,6 @@ ocv_add_dispatched_file(mathfuncs_core SSE2 AVX AVX2)
ocv_add_dispatched_file
(
stat SSE4_2 AVX2
)
ocv_add_module
(
core
"
${
OPENCV_HAL_LINKER_LIBS
}
"
OPTIONAL opencv_cudev
WRAP java python
)
...
...
@@ -57,10 +56,11 @@ endif()
ocv_create_module
(
${
extra_libs
}
)
ocv_target_link_libraries
(
${
the_module
}
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
"
${
ZLIB_LIBRARIES
}
"
"
${
OPENCL_LIBRARIES
}
"
"
${
VA_LIBRARIES
}
"
"
${
LAPACK_LIBRARIES
}
"
"
${
CPUFEATURES_LIBRARIES
}
"
"
${
HALIDE_LIBRARIES
}
"
"
${
ITT_LIBRARIES
}
"
"
${
OPENCV_HAL_LINKER_LIBS
}
"
)
ocv_add_accuracy_tests
()
...
...
modules/cudev/test/CMakeLists.txt
View file @
b6949c50
...
...
@@ -16,7 +16,9 @@ if(OCV_DEPENDENCIES_FOUND)
ocv_cuda_filter_options
()
CUDA_ADD_EXECUTABLE
(
${
the_target
}
${
OPENCV_TEST_
${
the_module
}
_SOURCES
}
)
ocv_target_link_libraries
(
${
the_target
}
${
test_deps
}
${
OPENCV_LINKER_LIBS
}
${
CUDA_LIBRARIES
}
)
ocv_target_link_libraries
(
${
the_target
}
LINK_PRIVATE
${
test_deps
}
${
OPENCV_LINKER_LIBS
}
${
CUDA_LIBRARIES
}
)
add_dependencies
(
opencv_tests
${
the_target
}
)
set_target_properties
(
${
the_target
}
PROPERTIES LABELS
"
${
OPENCV_MODULE_
${
the_module
}
_LABEL
}
"
)
...
...
modules/highgui/CMakeLists.txt
View file @
b6949c50
...
...
@@ -147,11 +147,6 @@ if(MSVC)
set_target_properties
(
${
the_module
}
PROPERTIES LINK_FLAGS
"/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG"
)
endif
()
if
(
NOT BUILD_opencv_world
)
#stop automatic dependencies propagation for this module
set_target_properties
(
${
the_module
}
PROPERTIES LINK_INTERFACE_LIBRARIES
""
)
endif
()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wno-deprecated-declarations
)
endmacro
()
...
...
modules/imgcodecs/CMakeLists.txt
View file @
b6949c50
...
...
@@ -123,9 +123,6 @@ if(MSVC)
set_target_properties
(
${
the_module
}
PROPERTIES LINK_FLAGS
"/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG"
)
endif
()
#stop automatic dependencies propagation for this module
set_target_properties
(
${
the_module
}
PROPERTIES LINK_INTERFACE_LIBRARIES
""
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wno-deprecated-declarations
)
endmacro
()
...
...
modules/java/CMakeLists.txt
View file @
b6949c50
...
...
@@ -435,14 +435,14 @@ if(BUILD_FAT_JAVA_LIB)
endif()
if(APPLE)
foreach(_dep
${
__deps
}
)
ocv_target_link_libraries(
${
the_module
}
-Wl,-force_load "
${
_dep
}
")
ocv_target_link_libraries(
${
the_module
}
LINK_PRIVATE
-Wl,-force_load "
${
_dep
}
")
endforeach()
else()
ocv_target_link_libraries(
${
the_module
}
-Wl,-whole-archive
${
__deps
}
-Wl,-no-whole-archive)
ocv_target_link_libraries(
${
the_module
}
LINK_PRIVATE
-Wl,-whole-archive
${
__deps
}
-Wl,-no-whole-archive)
endif()
ocv_target_link_libraries(
${
the_module
}
${
__extradeps
}
${
OPENCV_LINKER_LIBS
}
)
ocv_target_link_libraries(
${
the_module
}
LINK_PRIVATE
${
__extradeps
}
${
OPENCV_LINKER_LIBS
}
)
else()
ocv_target_link_libraries(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
ocv_target_link_libraries(
${
the_module
}
LINK_PRIVATE
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
endif()
# Additional target properties
...
...
@@ -451,12 +451,12 @@ set_target_properties(${the_module} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
LIBRARY_OUTPUT_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
RUNTIME_OUTPUT_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
LINK_INTERFACE_LIBRARIES ""
)
if(ANDROID)
ocv_target_link_libraries(
${
the_module
}
jnigraphics) # for Mat <=> Bitmap converters
ocv_target_link_libraries(
${
the_module
}
LINK_INTERFACE_LIBRARIES
${
OPENCV_LINKER_LIBS
}
jnigraphics)
ocv_target_link_libraries(
${
the_module
}
LINK_PUBLIC jnigraphics) # for Mat <=> Bitmap converters
ocv_target_link_libraries(
${
the_module
}
LINK_PUBLIC log dl z)
ocv_target_link_libraries(
${
the_module
}
LINK_PRIVATE
${
OPENCV_LINKER_LIBS
}
)
# force strip library after the build command
# because samples and tests will make a copy of the library before install
...
...
modules/python/common.cmake
View file @
b6949c50
...
...
@@ -72,12 +72,12 @@ if(APPLE)
set_target_properties
(
${
the_module
}
PROPERTIES LINK_FLAGS
"-undefined dynamic_lookup"
)
elseif
(
WIN32 OR OPENCV_FORCE_PYTHON_LIBS
)
if
(
${
PYTHON
}
_DEBUG_LIBRARIES AND NOT
${
PYTHON
}
_LIBRARIES MATCHES
"optimized.*debug"
)
ocv_target_link_libraries
(
${
the_module
}
debug
${${
PYTHON
}
_DEBUG_LIBRARIES
}
optimized
${${
PYTHON
}
_LIBRARIES
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
debug
${${
PYTHON
}
_DEBUG_LIBRARIES
}
optimized
${${
PYTHON
}
_LIBRARIES
}
)
else
()
ocv_target_link_libraries
(
${
the_module
}
${${
PYTHON
}
_LIBRARIES
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${${
PYTHON
}
_LIBRARIES
}
)
endif
()
endif
()
ocv_target_link_libraries
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
)
if
(
DEFINED
${
PYTHON
}
_CVPY_SUFFIX
)
set
(
CVPY_SUFFIX
"
${${
PYTHON
}
_CVPY_SUFFIX
}
"
)
...
...
modules/videoio/CMakeLists.txt
View file @
b6949c50
...
...
@@ -261,11 +261,6 @@ if(MSVC)
endif
()
endif
()
#stop automatic dependencies propagation for this module
if
(
NOT BUILD_opencv_world
)
set_target_properties
(
${
the_module
}
PROPERTIES LINK_INTERFACE_LIBRARIES
""
)
endif
()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wno-deprecated-declarations
)
if
(
WIN32 AND HAVE_FFMPEG
)
...
...
modules/viz/CMakeLists.txt
View file @
b6949c50
...
...
@@ -25,10 +25,10 @@ if(NOT BUILD_SHARED_LIBS)
endif
()
ocv_define_module
(
viz opencv_core WRAP python
)
ocv_target_link_libraries
(
${
the_module
}
${
VTK_LIBRARIES
}
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
VTK_LIBRARIES
}
)
if
(
APPLE AND BUILD_opencv_viz
)
ocv_target_link_libraries
(
${
the_module
}
"-framework Cocoa"
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE
"-framework Cocoa"
)
endif
()
if
(
TARGET opencv_test_viz
)
...
...
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