From aa32e3deb1b2ba9f3ff85314862d5d364b329022 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 31 Mar 2021 23:40:19 +0000 Subject: [PATCH] cmake: fix ADE dependency handling --- modules/gapi/cmake/DownloadADE.cmake | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/gapi/cmake/DownloadADE.cmake b/modules/gapi/cmake/DownloadADE.cmake index ee1b645412..aa24e949ea 100644 --- a/modules/gapi/cmake/DownloadADE.cmake +++ b/modules/gapi/cmake/DownloadADE.cmake @@ -20,12 +20,26 @@ 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 ${ADE_include} ${ADE_sources}) +add_library(ade STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} + ${ADE_include} + ${ADE_sources} +) target_include_directories(ade PUBLIC $) -set_target_properties(ade PROPERTIES POSITION_INDEPENDENT_CODE True) +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) + 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")