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
f548d660
Commit
f548d660
authored
Aug 22, 2017
by
Alexander Alekhin
Committed by
GitHub
Aug 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9432 from alalek:cmake_deprecated_policies_2.4
(2.4) cmake deprecated policies (backport 9415)
parents
f7d99f3f
e575b5ff
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
51 additions
and
114 deletions
+51
-114
CMakeLists.txt
3rdparty/tbb/CMakeLists.txt
+1
-1
CMakeLists.txt
CMakeLists.txt
+5
-18
FindCUDA.cmake
cmake/FindCUDA.cmake
+6
-6
OpenCVDetectAndroidSDK.cmake
cmake/OpenCVDetectAndroidSDK.cmake
+2
-3
OpenCVDetectCUDA.cmake
cmake/OpenCVDetectCUDA.cmake
+1
-1
OpenCVDetectCXXCompiler.cmake
cmake/OpenCVDetectCXXCompiler.cmake
+4
-42
OpenCVFindLibsVideo.cmake
cmake/OpenCVFindLibsVideo.cmake
+9
-16
OpenCVGenPkgconfig.cmake
cmake/OpenCVGenPkgconfig.cmake
+9
-9
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+4
-4
OpenCVPackaging.cmake
cmake/OpenCVPackaging.cmake
+1
-1
CMakeLists.txt
modules/highgui/CMakeLists.txt
+0
-3
CMakeLists.txt
modules/java/CMakeLists.txt
+8
-9
CMakeLists.txt
modules/viz/CMakeLists.txt
+1
-1
No files found.
3rdparty/tbb/CMakeLists.txt
View file @
f548d660
...
...
@@ -187,7 +187,7 @@ if (HAVE_LIBPTHREAD)
add_definitions
(
-DUSE_PTHREAD
)
#required for Unix
endif
()
if
(
CMAKE_COMPILER_IS_GNU
CXX
)
if
(
CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_COMPILER_IS_CLANG
CXX
)
add_definitions
(
-DTBB_USE_GCC_BUILTINS=1
)
#required for ARM GCC
endif
()
...
...
CMakeLists.txt
View file @
f548d660
...
...
@@ -37,24 +37,15 @@ endif(NOT CMAKE_TOOLCHAIN_FILE)
# Top level OpenCV project
# --------------------------------------------------------------
if
(
CMAKE_GENERATOR MATCHES Xcode AND XCODE_VERSION VERSION_GREATER 4.3
)
cmake_minimum_required
(
VERSION
2.8.8
)
cmake_minimum_required
(
VERSION
3.0
)
elseif
(
IOS
)
cmake_minimum_required
(
VERSION
2.8
.0
)
cmake_minimum_required
(
VERSION
3
.0
)
else
()
cmake_minimum_required
(
VERSION 2.6.3
)
endif
()
if
(
POLICY CMP0017
)
cmake_policy
(
SET CMP0017 NEW
)
endif
()
if
(
POLICY CMP0022
)
cmake_policy
(
SET CMP0022 OLD
)
cmake_minimum_required
(
VERSION 2.8.12.2
)
endif
()
if
(
POLICY CMP0026
)
# silence cmake 3.0+ warnings about reading LOCATION attribute
cmake_policy
(
SET CMP0026 OLD
)
cmake_policy
(
SET CMP0026 NEW
)
endif
()
if
(
POLICY CMP0042
)
...
...
@@ -712,10 +703,6 @@ endif()
# ========================== C/C++ options ==========================
if
(
CMAKE_CXX_COMPILER_VERSION
)
set
(
OPENCV_COMPILER_STR
"
${
CMAKE_CXX_COMPILER
}
${
CMAKE_CXX_COMPILER_ARG1
}
(ver
${
CMAKE_CXX_COMPILER_VERSION
}
)"
)
elseif
(
CMAKE_COMPILER_IS_CLANGCXX
)
set
(
OPENCV_COMPILER_STR
"
${
CMAKE_CXX_COMPILER
}
${
CMAKE_CXX_COMPILER_ARG1
}
(ver
${
CMAKE_CLANG_REGEX_VERSION
}
)"
)
elseif
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
OPENCV_COMPILER_STR
"
${
CMAKE_CXX_COMPILER
}
${
CMAKE_CXX_COMPILER_ARG1
}
(ver
${
CMAKE_GCC_REGEX_VERSION
}
)"
)
else
()
set
(
OPENCV_COMPILER_STR
"
${
CMAKE_CXX_COMPILER
}
${
CMAKE_CXX_COMPILER_ARG1
}
"
)
endif
()
...
...
@@ -1029,7 +1016,7 @@ if(HAVE_OPENCL)
set
(
__libs
""
)
foreach
(
l
${
OPENCL_LIBRARIES
}
)
if
(
TARGET
${
l
}
)
get_target_property
(
p
${
l
}
LOCATION
)
get_target_property
(
p
${
l
}
IMPORTED_
LOCATION
)
if
(
p MATCHES NOTFOUND
)
list
(
APPEND __libs
"
${
l
}
"
)
else
()
...
...
cmake/FindCUDA.cmake
View file @
f548d660
...
...
@@ -1553,7 +1553,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
}
)
...
...
@@ -1597,7 +1597,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
}
)
...
...
@@ -1672,9 +1672,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
()
...
...
@@ -1685,9 +1685,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 @
f548d660
...
...
@@ -302,16 +302,15 @@ macro(add_android_project target path)
endif
()
add_library
(
${
JNI_LIB_NAME
}
SHARED
${
android_proj_jni_files
}
)
target_link_libraries
(
${
JNI_LIB_NAME
}
${
OPENCV_LINKER_LIBS
}
${
android_proj_NATIVE_DEPS
}
)
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
}
"
LIBRARY_OUTPUT_DIRECTORY
"
${
android_proj_bin_dir
}
/libs/
${
ANDROID_NDK_ABI_NAME
}
"
)
get_target_property
(
android_proj_jni_location
"
${
JNI_LIB_NAME
}
"
LOCATION
)
if
(
NOT
(
CMAKE_BUILD_TYPE MATCHES
"debug"
))
add_custom_command
(
TARGET
${
JNI_LIB_NAME
}
POST_BUILD COMMAND
${
CMAKE_STRIP
}
--strip-unneeded
"
$
{
android_proj_jni_location
}
"
)
add_custom_command
(
TARGET
${
JNI_LIB_NAME
}
POST_BUILD COMMAND
${
CMAKE_STRIP
}
--strip-unneeded
"$
<TARGET_FILE:
${
JNI_LIB_NAME
}
>
"
)
endif
()
endif
()
...
...
cmake/OpenCVDetectCUDA.cmake
View file @
f548d660
...
...
@@ -212,7 +212,7 @@ if(CUDA_FOUND)
endif
()
# disabled because of multiple warnings during building nvcc auto generated files
if
(
CMAKE_COMPILER_IS_GNUCXX AND CMAKE_
GCC_REGEX
_VERSION VERSION_GREATER
"4.6.0"
)
if
(
CMAKE_COMPILER_IS_GNUCXX AND CMAKE_
CXX_COMPILER
_VERSION VERSION_GREATER
"4.6.0"
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wunused-but-set-variable
)
endif
()
...
...
cmake/OpenCVDetectCXXCompiler.cmake
View file @
f548d660
...
...
@@ -42,49 +42,11 @@ if(MSVC AND CMAKE_C_COMPILER MATCHES "icc|icl")
set
(
CV_ICC __INTEL_COMPILER_FOR_WINDOWS
)
endif
()
# ----------------------------------------------------------------------------
# Detect GNU version:
# ----------------------------------------------------------------------------
if
(
CMAKE_COMPILER_IS_CLANGCXX
)
set
(
CMAKE_GCC_REGEX_VERSION
"4.2.1"
)
set
(
CMAKE_OPENCV_GCC_VERSION_MAJOR 4
)
set
(
CMAKE_OPENCV_GCC_VERSION_MINOR 2
)
set
(
CMAKE_OPENCV_GCC_VERSION 42
)
set
(
CMAKE_OPENCV_GCC_VERSION_NUM 402
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
${
CMAKE_CXX_COMPILER_ARG1
}
-v
ERROR_VARIABLE CMAKE_OPENCV_CLANG_VERSION_FULL
ERROR_STRIP_TRAILING_WHITESPACE
)
string
(
REGEX MATCH
"version.*$"
CMAKE_OPENCV_CLANG_VERSION_FULL
"
${
CMAKE_OPENCV_CLANG_VERSION_FULL
}
"
)
string
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+"
CMAKE_CLANG_REGEX_VERSION
"
${
CMAKE_OPENCV_CLANG_VERSION_FULL
}
"
)
elseif
(
CMAKE_COMPILER_IS_GNUCXX
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
${
CMAKE_CXX_COMPILER_ARG1
}
-dumpversion
OUTPUT_VARIABLE CMAKE_OPENCV_GCC_VERSION_FULL
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
${
CMAKE_CXX_COMPILER_ARG1
}
-v
ERROR_VARIABLE CMAKE_OPENCV_GCC_INFO_FULL
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Typical output in CMAKE_OPENCV_GCC_VERSION_FULL: "c+//0 (whatever) 4.2.3 (...)"
# Look for the version number
string
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+
\\
.[0-9]+"
CMAKE_GCC_REGEX_VERSION
"
${
CMAKE_OPENCV_GCC_VERSION_FULL
}
"
)
if
(
NOT CMAKE_GCC_REGEX_VERSION
)
string
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+"
CMAKE_GCC_REGEX_VERSION
"
${
CMAKE_OPENCV_GCC_VERSION_FULL
}
"
)
endif
()
# Split the three parts:
string
(
REGEX MATCHALL
"[0-9]+"
CMAKE_OPENCV_GCC_VERSIONS
"
${
CMAKE_GCC_REGEX_VERSION
}
"
)
list
(
GET CMAKE_OPENCV_GCC_VERSIONS 0 CMAKE_OPENCV_GCC_VERSION_MAJOR
)
list
(
GET CMAKE_OPENCV_GCC_VERSIONS 1 CMAKE_OPENCV_GCC_VERSION_MINOR
)
set
(
CMAKE_OPENCV_GCC_VERSION
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}${
CMAKE_OPENCV_GCC_VERSION_MINOR
}
)
math
(
EXPR CMAKE_OPENCV_GCC_VERSION_NUM
"
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}
*100 +
${
CMAKE_OPENCV_GCC_VERSION_MINOR
}
"
)
message
(
STATUS
"Detected version of GNU GCC:
${
CMAKE_OPENCV_GCC_VERSION
}
(
${
CMAKE_OPENCV_GCC_VERSION_NUM
}
)"
)
if
(
NOT DEFINED CMAKE_CXX_COMPILER_VERSION
)
message
(
WARNING
"Compiler version is not available: CMAKE_CXX_COMPILER_VERSION is not set"
)
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
if
(
WIN32
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-dumpmachine
OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
...
...
cmake/OpenCVFindLibsVideo.cmake
View file @
f548d660
...
...
@@ -84,23 +84,16 @@ if(WITH_PVAPI)
set
(
PVAPI_SDK_SUBDIR arm
)
endif
()
get_filename_component
(
_PVAPI_LIBRARY
"
${
PVAPI_INCLUDE_PATH
}
/../lib-pc"
ABSOLUTE
)
if
(
PVAPI_SDK_SUBDIR
)
set
(
_PVAPI_LIBRARY
"
${
_PVAPI_LIBRARY
}
/
${
PVAPI_SDK_SUBDIR
}
"
)
endif
()
if
(
NOT WIN32 AND CMAKE_COMPILER_IS_GNUCXX
)
set
(
_PVAPI_LIBRARY
"
${
_PVAPI_LIBRARY
}
/
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}
.
${
CMAKE_OPENCV_GCC_VERSION_MINOR
}
"
)
endif
()
get_filename_component
(
_PVAPI_LIBRARY_HINT
"
${
PVAPI_INCLUDE_PATH
}
/../lib-pc"
ABSOLUTE
)
if
(
WIN32
)
if
(
MINGW
)
set
(
PVAPI_DEFINITIONS
"-DPVDECL=__stdcall"
)
endif
(
MINGW
)
set
(
PVAPI_LIBRARY
"
${
_PVAPI_LIBRARY
}
/PvAPI.lib"
CACHE PATH
"The PvAPI library"
)
else
(
WIN32
)
set
(
PVAPI_LIBRARY
"
${
_PVAPI_LIBRARY
}
/
${
CMAKE_STATIC_LIBRARY_PREFIX
}
PvAPI
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
"
CACHE PATH
"The PvAPI library"
)
endif
(
WIN32
)
if
(
EXISTS
"
${
PVAPI_LIBRARY
}
"
)
find_library
(
PVAPI_LIBRARY NAMES
"PvAPI"
PATHS
"
${
_PVAPI_LIBRARY_HINT
}
"
)
if
(
PVAPI_LIBRARY
)
if
(
WIN32
)
if
(
MINGW
)
set
(
PVAPI_DEFINITIONS
"-DPVDECL=__stdcall"
)
endif
(
MINGW
)
endif
()
set
(
HAVE_PVAPI TRUE
)
endif
()
endif
(
PVAPI_INCLUDE_PATH
)
...
...
cmake/OpenCVGenPkgconfig.cmake
View file @
f548d660
...
...
@@ -46,16 +46,16 @@ endif()
set
(
OpenCV_LIB_COMPONENTS_
)
foreach
(
CVLib
${
OpenCV_LIB_COMPONENTS
}
)
get_target_property
(
libloc
${
CVLib
}
LOCATION_
${
CMAKE_BUILD_TYPE
}
)
if
(
libloc MATCHES
"3rdparty"
)
set
(
libpath
"
\$
{exec_prefix}/share/OpenCV/3rdparty/
${
OPENCV_LIB_INSTALL_PATH
}
"
)
else
()
set
(
libpath
"
\$
{exec_prefix}/
${
OPENCV_LIB_INSTALL_PATH
}
"
)
get_target_property
(
libname
${
CVLib
}
OUTPUT_NAME_
${
CMAKE_BUILD_TYPE
}
)
if
(
NOT libname
)
get_target_property
(
libname
${
CVLib
}
OUTPUT_NAME
)
endif
()
if
(
NOT libname
)
set
(
libname
"
${
CVLib
}
"
)
endif
()
list
(
APPEND OpenCV_LIB_COMPONENTS_
"-L
${
libpath
}
"
)
get_filename_component
(
libname
${
CVLib
}
NAME_WE
)
string
(
REGEX REPLACE
"^lib"
""
libname
"
${
libname
}
"
)
set
(
libpath
"
\$
{exec_prefix}/
${
OPENCV_LIB_INSTALL_PATH
}
"
)
list
(
APPEND OpenCV_LIB_COMPONENTS_
"-L
${
libpath
}
"
)
list
(
APPEND OpenCV_LIB_COMPONENTS_
"-l
${
libname
}
"
)
endforeach
()
...
...
@@ -66,7 +66,7 @@ if(OpenCV_EXTRA_COMPONENTS)
if
(
TARGET
"
${
extra_component
}
"
)
get_target_property
(
extra_component_is_imported
"
${
extra_component
}
"
IMPORTED
)
if
(
extra_component_is_imported
)
get_target_property
(
extra_component
"
${
extra_component
}
"
LOCATION
)
get_target_property
(
extra_component
"
${
extra_component
}
"
IMPORTED_
LOCATION
)
endif
()
endif
()
...
...
cmake/OpenCVModule.cmake
View file @
f548d660
...
...
@@ -578,12 +578,12 @@ macro(ocv_create_module)
${${
the_module
}
_pch
}
)
if
(
NOT
"
${
ARGN
}
"
STREQUAL
"SKIP_LINK"
)
target_link_libraries
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
)
target_link_libraries
(
${
the_module
}
LINK_
INTERFACE_LIBRARIES
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
)
target_link_libraries
(
${
the_module
}
LINK_PUBLIC
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
)
target_link_libraries
(
${
the_module
}
LINK_
PUBLIC
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
)
set
(
extra_deps
${
OPENCV_MODULE_
${
the_module
}
_DEPS_EXT
}
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBS
}
${
ARGN
}
)
ocv_extract_simple_libs
(
extra_deps _simple_deps _other_deps
)
target_link_libraries
(
${
the_module
}
LINK_
INTERFACE_LIBRARIES
${
_simple_deps
}
)
# this list goes to "export"
target_link_libraries
(
${
the_module
}
${
extra_deps
}
)
target_link_libraries
(
${
the_module
}
LINK_
PRIVATE
${
_simple_deps
}
)
# this list goes to "export"
target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
extra_deps
}
)
endif
()
add_dependencies
(
opencv_modules
${
the_module
}
)
...
...
cmake/OpenCVPackaging.cmake
View file @
f548d660
...
...
@@ -124,7 +124,7 @@ set(STD_OPENCV_DEV libopencv-dev)
set
(
ABI_VERSION_SUFFIX
""
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
if
(
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}
EQUAL 5
)
if
(
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6
)
set
(
ABI_VERSION_SUFFIX
"v5"
)
endif
()
endif
()
...
...
modules/highgui/CMakeLists.txt
View file @
f548d660
...
...
@@ -293,9 +293,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_add_precompiled_headers
(
${
the_module
}
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wno-deprecated-declarations -Wno-clobbered
)
...
...
modules/java/CMakeLists.txt
View file @
f548d660
...
...
@@ -314,25 +314,26 @@ if(BUILD_FAT_JAVA_LIB)
endif
()
if
(
APPLE
)
foreach
(
_dep
${
__deps
}
)
target_link_libraries
(
${
the_module
}
-Wl,-force_load
"
${
_dep
}
"
)
target_link_libraries
(
${
the_module
}
LINK_PRIVATE
-Wl,-force_load
"
${
_dep
}
"
)
endforeach
()
else
()
target_link_libraries
(
${
the_module
}
-Wl,-whole-archive
${
__deps
}
-Wl,-no-whole-archive
)
target_link_libraries
(
${
the_module
}
LINK_PRIVATE
-Wl,-whole-archive
${
__deps
}
-Wl,-no-whole-archive
)
endif
()
target_link_libraries
(
${
the_module
}
${
__extradeps
}
${
OPENCV_LINKER_LIBS
}
)
target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
__extradeps
}
${
OPENCV_LINKER_LIBS
}
)
else
()
target_link_libraries
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
target_link_libraries
(
${
the_module
}
LINK_PRIVATE
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_LINKER_LIBS
}
)
endif
()
if
(
ANDROID
)
target_link_libraries
(
${
the_module
}
jnigraphics
)
# for Mat <=> Bitmap converters
target_link_libraries
(
${
the_module
}
LINK_PUBLIC jnigraphics
)
# for Mat <=> Bitmap converters
target_link_libraries
(
${
the_module
}
LINK_PUBLIC log dl z
)
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
get_target_property
(
__opencv_java_location
${
the_module
}
LOCATION
)
# Turn off stripping in debug build
if
(
NOT
(
CMAKE_BUILD_TYPE MATCHES
"Debug"
))
add_custom_command
(
TARGET
${
the_module
}
POST_BUILD COMMAND
${
CMAKE_STRIP
}
--strip-unneeded
"
$
{
__opencv_java_location
}
"
)
add_custom_command
(
TARGET
${
the_module
}
POST_BUILD COMMAND
${
CMAKE_STRIP
}
--strip-unneeded
"$
<TARGET_FILE:
${
the_module
}
>
"
)
endif
()
endif
()
...
...
@@ -342,8 +343,6 @@ set_target_properties(${the_module} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
LIBRARY_OUTPUT_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
RUNTIME_OUTPUT_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
INSTALL_NAME_DIR
${
OPENCV_LIB_INSTALL_PATH
}
LINK_INTERFACE_LIBRARIES
""
)
if
(
WIN32
)
...
...
modules/viz/CMakeLists.txt
View file @
f548d660
...
...
@@ -7,7 +7,7 @@ set(the_description "Viz")
ocv_define_module
(
viz opencv_core
${
VTK_LIBRARIES
}
)
if
(
APPLE AND BUILD_opencv_viz
)
target_link_libraries
(
opencv_viz
"-framework Cocoa"
)
target_link_libraries
(
opencv_viz
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