Commit 13f4e70e authored by Andrey Kamaev's avatar Andrey Kamaev

Updating opencv module definition in cmake

parent 2395654c
...@@ -228,6 +228,7 @@ OCV_OPTION(ENABLE_SSE3 "Enable SSE3 instructions" ...@@ -228,6 +228,7 @@ OCV_OPTION(ENABLE_SSE3 "Enable SSE3 instructions"
OCV_OPTION(ENABLE_SSSE3 "Enable SSSE3 instructions" OFF IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) ) OCV_OPTION(ENABLE_SSSE3 "Enable SSSE3 instructions" OFF IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
OCV_OPTION(ENABLE_SSE41 "Enable SSE4.1 instructions" OFF IF (CV_ICC OR CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) ) OCV_OPTION(ENABLE_SSE41 "Enable SSE4.1 instructions" OFF IF (CV_ICC OR CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
OCV_OPTION(ENABLE_SSE42 "Enable SSE4.2 instructions" OFF IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) ) OCV_OPTION(ENABLE_SSE42 "Enable SSE4.2 instructions" OFF IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Get actual OpenCV version number from sources # Get actual OpenCV version number from sources
...@@ -1056,21 +1057,16 @@ include_directories("." ...@@ -1056,21 +1057,16 @@ include_directories("."
"${CMAKE_CURRENT_SOURCE_DIR}/include/opencv" "${CMAKE_CURRENT_SOURCE_DIR}/include/opencv"
) )
# ----------------------------------------------------------------------------
# Set the maximum level of warnings:
# ----------------------------------------------------------------------------
# Should be set to true for development
set(OPENCV_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Treat warnings as errors")
if (WIN32 AND ${CMAKE_GENERATOR} MATCHES "(MinGW)|(MSYS)") if (WIN32 AND ${CMAKE_GENERATOR} MATCHES "(MinGW)|(MSYS)")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "")
endif() endif()
set(OPENCV_EXTRA_C_FLAGS) set(OPENCV_EXTRA_C_FLAGS "")
set(OPENCV_EXTRA_C_FLAGS_RELEASE) set(OPENCV_EXTRA_C_FLAGS_RELEASE "")
set(OPENCV_EXTRA_C_FLAGS_DEBUG) set(OPENCV_EXTRA_C_FLAGS_DEBUG "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS) set(OPENCV_EXTRA_EXE_LINKER_FLAGS "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE) set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG) set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "")
if(MSVC) if(MSVC)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS") set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS")
...@@ -1667,3 +1663,4 @@ status("") ...@@ -1667,3 +1663,4 @@ status("")
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree") message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
endif() endif()
#opencv precompiled headers macro (can add pch to modules and tests) set(opencv_public_modules "" CACHE INTERNAL "List of OpenCV modules included into the build")
#this macro must be called after any "add_definitions" commands, otherwise precompiled headers will not work # helper macro for modules management
macro(register_opencv_module name)
set(opencv_public_modules ${opencv_public_modules} ${name} CACHE INTERNAL "List of OpenCV modules included into the build")
endmacro()
# opencv precompiled headers macro (can add pch to modules and tests)
# this macro must be called after any "add_definitions" commands, otherwise precompiled headers will not work
macro(add_opencv_precompiled_headers the_target) macro(add_opencv_precompiled_headers the_target)
if("${the_target}" MATCHES "opencv_test_.*") if("${the_target}" MATCHES "opencv_test_.*")
SET(pch_name "test/test_precomp") SET(pch_name "test/test_precomp")
...@@ -123,46 +129,8 @@ macro(define_opencv_test name) ...@@ -123,46 +129,8 @@ macro(define_opencv_test name)
endif() endif()
endmacro() endmacro()
# this is a template for a OpenCV module macro(setup_opencv_module name)
# define_opencv_module(<module_name> <dependencies>)
macro(define_opencv_module name)
project(opencv_${name})
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CMAKE_CURRENT_BINARY_DIR}")
foreach(d ${ARGN})
if(d MATCHES "opencv_")
string(REPLACE "opencv_" "${OpenCV_SOURCE_DIR}/modules/" d_dir ${d})
if (EXISTS "${d_dir}/include")
include_directories("${d_dir}/include")
endif()
endif()
endforeach()
file(GLOB lib_srcs "src/*.cpp")
file(GLOB lib_int_hdrs "src/*.h*")
file(GLOB lib_hdrs "include/opencv2/${name}/*.h*")
file(GLOB lib_hdrs_detail "include/opencv2/${name}/detail/*.h*")
if(COMMAND get_module_external_sources)
get_module_external_sources(${name})
endif()
source_group("Src" FILES ${lib_srcs} ${lib_int_hdrs})
source_group("Include" FILES ${lib_hdrs})
source_group("Include\\detail" FILES ${lib_hdrs_detail})
list(APPEND lib_hdrs ${lib_hdrs_detail})
set(the_target "opencv_${name}") set(the_target "opencv_${name}")
if (${name} MATCHES "ts" AND MINGW)
add_library(${the_target} STATIC ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
else()
add_library(${the_target} ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
endif()
# For dynamic link numbering convenions # For dynamic link numbering convenions
if(NOT ANDROID) if(NOT ANDROID)
# Android SDK build scripts can include only .so files into final .apk # Android SDK build scripts can include only .so files into final .apk
...@@ -195,23 +163,11 @@ macro(define_opencv_module name) ...@@ -195,23 +163,11 @@ macro(define_opencv_module name)
INSTALL_NAME_DIR lib INSTALL_NAME_DIR lib
) )
# Add the required libraries for linking:
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN})
if(MSVC) if(MSVC)
if(CMAKE_CROSSCOMPILING) if(CMAKE_CROSSCOMPILING)
set_target_properties(${the_target} PROPERTIES set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:secchk")
LINK_FLAGS "/NODEFAULTLIB:secchk"
)
endif() endif()
set_target_properties(${the_target} PROPERTIES set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:libc /DEBUG")
LINK_FLAGS "/NODEFAULTLIB:libc /DEBUG"
)
endif()
# Dependencies of this target:
if(ARGN)
add_dependencies(${the_target} ${ARGN})
endif() endif()
install(TARGETS ${the_target} install(TARGETS ${the_target}
...@@ -219,12 +175,71 @@ macro(define_opencv_module name) ...@@ -219,12 +175,71 @@ macro(define_opencv_module name)
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main) ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
if(lib_hdrs)
install(FILES ${lib_hdrs} install(FILES ${lib_hdrs}
DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2/${name} DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2/${name}
COMPONENT main) COMPONENT main)
endif()
add_opencv_precompiled_headers(${the_target}) add_opencv_precompiled_headers(${the_target})
endmacro()
# this is a template for a OpenCV module declaration
# define_opencv_moduleEx(<module_name> [public|internal] [STATIC|SHARED|AUTO] <dependencies>)
macro(define_opencv_moduleEx _name _visibility moduletype)
string(TOLOWER "${_name}" name)
string(TOUPPER "${_name}" mname)
string(TOLOWER "${_visibility}" visibility)
string(TOUPPER "${moduletype}" modtype)
if(modtype STREQUAL "AUTO" )
set(modtype "")
endif()
option(OCVMODULE_${mname} "Include ${name} module into the OpenCV build" ON)
if(OCVMODULE_${mname})
set(the_target "opencv_${name}")
if(visibility STREQUAL "public")
register_opencv_module(${the_target})
endif()
project(${the_target})
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CMAKE_CURRENT_BINARY_DIR}")
include_opencv_modules(${ARGN})
file(GLOB lib_srcs "src/*.cpp")
file(GLOB lib_int_hdrs "src/*.h*")
file(GLOB lib_hdrs "include/opencv2/${name}/*.h*")
file(GLOB lib_hdrs_detail "include/opencv2/${name}/detail/*.h*")
if(COMMAND get_module_external_sources)
get_module_external_sources(${name})
endif()
source_group("Src" FILES ${lib_srcs} ${lib_int_hdrs})
source_group("Include" FILES ${lib_hdrs})
source_group("Include\\detail" FILES ${lib_hdrs_detail})
list(APPEND lib_hdrs ${lib_hdrs_detail})
add_library(${the_target} ${modtype} ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
# Add the required libraries for linking:
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN})
setup_opencv_module("${name}")
define_opencv_test(${name}) define_opencv_test(${name})
define_opencv_perf_test(${name}) define_opencv_perf_test(${name})
endif()
endmacro() endmacro()
# this is a shorthand for a public OpenCV module declaration
# define_opencv_module(<module_name> <dependencies>)
macro(define_opencv_module name)
define_opencv_moduleEx(${name} PUBLIC AUTO ${ARGN})
endmacro()
...@@ -116,3 +116,14 @@ macro(status text) ...@@ -116,3 +116,14 @@ macro(status text)
endif() endif()
endmacro() endmacro()
# Setup include path for OpenCV headers for specified modules
macro(include_opencv_modules)
foreach(d ${ARGN})
if(d MATCHES "opencv_")
string(REPLACE "opencv_" "${OpenCV_SOURCE_DIR}/modules/" d_dir ${d})
if (EXISTS "${d_dir}/include")
include_directories("${d_dir}/include")
endif()
endif()
endforeach()
endmacro()
option(OCVMODULE_GPU "Include gpu module into the OpenCV build" ON)
if(NOT OCVMODULE_GPU)
return()
endif()
set(name "gpu") set(name "gpu")
set(the_target "opencv_${name}") set(the_target "opencv_${name}")
...@@ -28,12 +33,7 @@ file(GLOB lib_device_hdrs_detail "src/opencv2/gpu/device/detail/*.h*") ...@@ -28,12 +33,7 @@ file(GLOB lib_device_hdrs_detail "src/opencv2/gpu/device/detail/*.h*")
source_group("Device" FILES ${lib_device_hdrs}) source_group("Device" FILES ${lib_device_hdrs})
source_group("Device\\Detail" FILES ${lib_device_hdrs_detail}) source_group("Device\\Detail" FILES ${lib_device_hdrs_detail})
foreach(d ${DEPS_HEADER}) include_opencv_modules(${DEPS_HEADER})
if(${d} MATCHES "opencv_")
string(REPLACE "opencv_" "${CMAKE_CURRENT_SOURCE_DIR}/../" d_dir ${d})
include_directories("${d_dir}/include")
endif()
endforeach()
if (HAVE_CUDA) if (HAVE_CUDA)
file(GLOB_RECURSE ncv_srcs "src/nvidia/*.cpp") file(GLOB_RECURSE ncv_srcs "src/nvidia/*.cpp")
...@@ -91,35 +91,6 @@ endif() ...@@ -91,35 +91,6 @@ endif()
add_library(${the_target} ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs} ${lib_cuda} ${lib_cuda_hdrs} ${lib_device_hdrs} ${lib_device_hdrs_detail} ${ncv_srcs} ${ncv_hdrs} ${ncv_cuda} ${cuda_objs}) add_library(${the_target} ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs} ${lib_cuda} ${lib_cuda_hdrs} ${lib_device_hdrs} ${lib_device_hdrs_detail} ${ncv_srcs} ${ncv_hdrs} ${ncv_cuda} ${cuda_objs})
# For dynamic link numbering convenions
set_target_properties(${the_target} PROPERTIES
VERSION ${OPENCV_VERSION}
SOVERSION ${OPENCV_SOVERSION}
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
)
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "modules")
endif()
if (BUILD_SHARED_LIBS)
if (MSVC)
set_target_properties(${the_target} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
else()
add_definitions(-DCVAPI_EXPORTS)
endif()
endif()
add_opencv_precompiled_headers(${the_target})
# Additional target properties
set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
)
# Add the required libraries for linking: # Add the required libraries for linking:
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${DEPS} ) target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${DEPS} )
...@@ -139,25 +110,7 @@ if (HAVE_CUDA) ...@@ -139,25 +110,7 @@ if (HAVE_CUDA)
endif() endif()
endif() endif()
if(MSVC) setup_opencv_module(${name})
if(CMAKE_CROSSCOMPILING)
set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:secchk")
endif()
set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:libc")
endif()
# Dependencies of this target:
add_dependencies(${the_target} ${DEPS})
install(TARGETS ${the_target}
RUNTIME DESTINATION bin COMPONENT main
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
install(FILES ${lib_hdrs}
DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2/${name}
COMPONENT main)
install(FILES src/nvidia/NPP_staging/NPP_staging.hpp src/nvidia/core/NCV.hpp install(FILES src/nvidia/NPP_staging/NPP_staging.hpp src/nvidia/core/NCV.hpp
DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2/${name} DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2/${name}
......
...@@ -3,7 +3,14 @@ ...@@ -3,7 +3,14 @@
# Some parts taken from version of Hartmut Seichter, HIT Lab NZ. # Some parts taken from version of Hartmut Seichter, HIT Lab NZ.
# Jose Luis Blanco, 2008 # Jose Luis Blanco, 2008
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
project(opencv_highgui)
option(OCVMODULE_HIGHGUI "Include highgui module into the OpenCV build" ON)
if(NOT OCVMODULE_HIGHGUI)
return()
endif()
set(the_target "opencv_highgui")
project(${the_target})
set(GRFMT_LIBS) set(GRFMT_LIBS)
...@@ -68,10 +75,6 @@ if(WITH_OPENEXR AND OPENEXR_FOUND) ...@@ -68,10 +75,6 @@ if(WITH_OPENEXR AND OPENEXR_FOUND)
set(GRFMT_LIBS ${GRFMT_LIBS} ${OPENEXR_LIBRARIES}) set(GRFMT_LIBS ${GRFMT_LIBS} ${OPENEXR_LIBRARIES})
endif() endif()
if(MSVC)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:libcmt.lib")
endif()
file(GLOB grfmt_hdrs src/grfmt*.hpp) file(GLOB grfmt_hdrs src/grfmt*.hpp)
file(GLOB grfmt_srcs src/grfmt*.cpp) file(GLOB grfmt_srcs src/grfmt*.cpp)
set(grfmt_hdrs src/bitstrm.hpp ${grfmt_hdrs}) set(grfmt_hdrs src/bitstrm.hpp ${grfmt_hdrs})
...@@ -250,19 +253,15 @@ if(OPENCV_BUILD_3RDPARTY_LIBS) ...@@ -250,19 +253,15 @@ if(OPENCV_BUILD_3RDPARTY_LIBS)
if(WIN32) if(WIN32)
link_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib") link_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib")
endif() endif()
link_directories( #link_directories(
"${CMAKE_BINARY_DIR}/3rdparty/lib" # "${CMAKE_BINARY_DIR}/3rdparty/lib"
"${CMAKE_BINARY_DIR}/3rdparty/lib/${ConfigurationName}" # "${CMAKE_BINARY_DIR}/3rdparty/lib/${ConfigurationName}"
) # )
endif() endif()
set(lib_srcs ${highgui_srcs} ${grfmt_srcs})
# ---------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------
# Define the library target: # Define the library target:
# ---------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------
set(the_target "opencv_highgui")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../core/include" "${CMAKE_CURRENT_SOURCE_DIR}/../core/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../imgproc/include" "${CMAKE_CURRENT_SOURCE_DIR}/../imgproc/include"
...@@ -273,75 +272,15 @@ if(WIN32) ...@@ -273,75 +272,15 @@ if(WIN32)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/include") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/include")
endif() endif()
add_library(${the_target} ${lib_srcs} ${highgui_hdrs} ${grfmt_hdrs} ${highgui_ext_hdrs}) add_library(${the_target} ${highgui_srcs} ${grfmt_srcs} ${highgui_hdrs} ${grfmt_hdrs} ${highgui_ext_hdrs})
register_opencv_module(${the_target})
if (BUILD_SHARED_LIBS) if (BUILD_SHARED_LIBS)
add_definitions(-DHIGHGUI_EXPORTS) add_definitions(-DHIGHGUI_EXPORTS)
if(MSVC)
set_target_properties(${the_target} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
else()
add_definitions(-DCVAPI_EXPORTS)
endif()
endif()
add_opencv_precompiled_headers(${the_target})
# For dynamic link numbering convenions
if(NOT ANDROID)
# Android SDK build scripts can include only .so files into final .apk
set_target_properties(${the_target} PROPERTIES
VERSION ${OPENCV_VERSION}
SOVERSION ${OPENCV_SOVERSION}
)
endif()
set_target_properties(${the_target} PROPERTIES OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}" )
# Additional target properties
set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
LINK_INTERFACE_LIBRARIES ""
)
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "modules")
endif() endif()
if(MSVC) if(MSVC)
set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG") set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /NODEFAULTLIB:libcmt.lib /DEBUG")
endif(MSVC)
# Dependencies of this target:
add_dependencies(${the_target} opencv_core opencv_imgproc)
# Add the required libraries for linking:
if(WITH_JASPER AND NOT JASPER_FOUND)
add_dependencies(${the_target} libjasper)
endif()
if(WITH_JPEG AND NOT JPEG_FOUND)
add_dependencies(${the_target} libjpeg)
endif()
if(WITH_PNG AND NOT PNG_FOUND)
add_dependencies(${the_target} libpng)
endif()
if(WITH_TIFF AND NOT TIFF_FOUND)
add_dependencies(${the_target} libtiff)
endif()
if(NOT ZLIB_FOUND)
add_dependencies(${the_target} zlib)
endif()
if(WITH_ANDROID_CAMERA)
add_dependencies(${the_target} opencv_androidcamera)
endif() endif()
#message(STATUS "GRFMT: ${GRFMT_LIBS}") #message(STATUS "GRFMT: ${GRFMT_LIBS}")
...@@ -371,16 +310,6 @@ if (IOS) ...@@ -371,16 +310,6 @@ if (IOS)
target_link_libraries(${the_target} "-lbz2 -framework QuartzCore -framework CoreFoundation -framework ImageIO -framework CoreGraphics -framework AVFoundation") target_link_libraries(${the_target} "-lbz2 -framework QuartzCore -framework CoreFoundation -framework ImageIO -framework CoreGraphics -framework AVFoundation")
endif() endif()
install(TARGETS ${the_target} setup_opencv_module(highgui)
RUNTIME DESTINATION bin COMPONENT main
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
install(FILES ${highgui_ext_hdrs}
DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2/highgui
COMPONENT main)
############################# highgui tests ################################
define_opencv_test(highgui) define_opencv_test(highgui)
define_opencv_perf_test(highgui) define_opencv_perf_test(highgui)
\ No newline at end of file
...@@ -6,4 +6,9 @@ if(BUILD_SHARED_LIBS) ...@@ -6,4 +6,9 @@ if(BUILD_SHARED_LIBS)
else() else()
add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=0) add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=0)
endif() endif()
define_opencv_module(ts opencv_core)
if(MINGW)
define_opencv_moduleEx(ts PUBLIC STATIC opencv_core)
else()
define_opencv_module(ts opencv_core)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment