DownloadADE.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. set(ade_src_dir "${OpenCV_BINARY_DIR}/3rdparty/ade")
  2. set(ade_filename "v0.1.1f.zip")
  3. set(ade_subdir "ade-0.1.1f")
  4. set(ade_md5 "b624b995ec9c439cbc2e9e6ee940d3a2")
  5. ocv_download(FILENAME ${ade_filename}
  6. HASH ${ade_md5}
  7. URL
  8. "${OPENCV_ADE_URL}"
  9. "$ENV{OPENCV_ADE_URL}"
  10. "https://github.com/opencv/ade/archive/"
  11. DESTINATION_DIR ${ade_src_dir}
  12. ID ADE
  13. STATUS res
  14. UNPACK RELATIVE_URL)
  15. if (NOT res)
  16. return()
  17. endif()
  18. set(ADE_root "${ade_src_dir}/${ade_subdir}/sources/ade")
  19. file(GLOB_RECURSE ADE_sources "${ADE_root}/source/*.cpp")
  20. file(GLOB_RECURSE ADE_include "${ADE_root}/include/ade/*.hpp")
  21. add_library(ade STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL}
  22. ${ADE_include}
  23. ${ADE_sources}
  24. )
  25. target_include_directories(ade PUBLIC $<BUILD_INTERFACE:${ADE_root}/include>)
  26. set_target_properties(ade PROPERTIES
  27. POSITION_INDEPENDENT_CODE True
  28. OUTPUT_NAME ade
  29. DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
  30. COMPILE_PDB_NAME ade
  31. COMPILE_PDB_NAME_DEBUG "ade${OPENCV_DEBUG_POSTFIX}"
  32. ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
  33. )
  34. if(ENABLE_SOLUTION_FOLDERS)
  35. set_target_properties(ade PROPERTIES FOLDER "3rdparty")
  36. endif()
  37. if(NOT BUILD_SHARED_LIBS)
  38. ocv_install_target(ade EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
  39. endif()
  40. ocv_install_3rdparty_licenses(ade "${ade_src_dir}/${ade_subdir}/LICENSE")