mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 11:21:39 +08:00

Migrate G-API module from main repo to opencv_contrib #3827 Related to https://github.com/opencv/opencv/pull/26469 Required https://github.com/opencv/opencv/pull/26527 CI: https://github.com/opencv/ci-gha-workflow/pull/201 TODO: - [x] Python types generator fix - [x] CI update ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
52 lines
1.7 KiB
CMake
52 lines
1.7 KiB
CMake
set(ade_src_dir "${OpenCV_BINARY_DIR}/3rdparty/ade")
|
|
set(ade_filename "v0.1.2e.zip")
|
|
set(ade_subdir "ade-0.1.2e")
|
|
set(ade_md5 "962ce79e0b95591f226431f7b5f152cd")
|
|
ocv_download(FILENAME ${ade_filename}
|
|
HASH ${ade_md5}
|
|
URL
|
|
"${OPENCV_ADE_URL}"
|
|
"$ENV{OPENCV_ADE_URL}"
|
|
"https://github.com/opencv/ade/archive/"
|
|
DESTINATION_DIR ${ade_src_dir}
|
|
ID ADE
|
|
STATUS res
|
|
UNPACK RELATIVE_URL)
|
|
|
|
if (NOT res)
|
|
return()
|
|
endif()
|
|
|
|
set(ADE_root "${ade_src_dir}/${ade_subdir}/sources/ade")
|
|
file(GLOB_RECURSE ADE_sources "${ADE_root}/source/*.cpp")
|
|
file(GLOB_RECURSE ADE_include "${ADE_root}/include/ade/*.hpp")
|
|
add_library(ade STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL}
|
|
${ADE_include}
|
|
${ADE_sources}
|
|
)
|
|
|
|
# https://github.com/opencv/ade/issues/32
|
|
if(CV_CLANG AND CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.1)
|
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-copy)
|
|
endif()
|
|
|
|
target_include_directories(ade PUBLIC $<BUILD_INTERFACE:${ADE_root}/include>)
|
|
set_target_properties(ade PROPERTIES
|
|
POSITION_INDEPENDENT_CODE True
|
|
OUTPUT_NAME ade
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
|
COMPILE_PDB_NAME ade
|
|
COMPILE_PDB_NAME_DEBUG "ade${OPENCV_DEBUG_POSTFIX}"
|
|
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
|
|
)
|
|
|
|
if(ENABLE_SOLUTION_FOLDERS)
|
|
set_target_properties(ade PROPERTIES FOLDER "3rdparty")
|
|
endif()
|
|
|
|
if(NOT BUILD_SHARED_LIBS)
|
|
ocv_install_target(ade EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
|
endif()
|
|
|
|
ocv_install_3rdparty_licenses(ade "${ade_src_dir}/${ade_subdir}/LICENSE")
|