Sevral fixes for FastCV handling.

This commit is contained in:
Alexander Smorkalov 2024-12-26 09:54:09 +03:00
parent 96d6395a6d
commit 745a12c03b
2 changed files with 9 additions and 7 deletions

View File

@ -24,8 +24,6 @@ if(HAVE_FASTCV)
ocv_install_target(fastcv_hal EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
ocv_install_3rdparty_licenses(FastCV "${OpenCV_BINARY_DIR}/3rdparty/fastcv/LICENSE")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(fastcv_hal PROPERTIES FOLDER "3rdparty")
endif()

View File

@ -180,6 +180,7 @@ endif(WITH_KLEIDICV)
# --- FastCV ---
if(WITH_FASTCV)
if((EXISTS ${FastCV_INCLUDE_PATH}) AND (EXISTS ${FastCV_LIB_PATH}))
message(STATUS "Use external FastCV ${FastCV_INCLUDE_PATH}, ${FastCV_LIB_PATH}")
set(HAVE_FASTCV TRUE CACHE BOOL "FastCV status")
else()
include("${OpenCV_SOURCE_DIR}/3rdparty/fastcv/fastcv.cmake")
@ -188,11 +189,14 @@ if(WITH_FASTCV)
if(HAVE_FASTCV)
set(FastCV_INCLUDE_PATH "${FCV_ROOT_DIR}/inc" CACHE PATH "FastCV includes directory")
set(FastCV_LIB_PATH "${FCV_ROOT_DIR}/libs" CACHE PATH "FastCV library directory")
ocv_install_3rdparty_licenses(FastCV "${OpenCV_BINARY_DIR}/3rdparty/fastcv/LICENSE")
install(FILES "${FastCV_LIB_PATH}/libfastcvopt.so"
DESTINATION "${OPENCV_LIB_INSTALL_PATH}" COMPONENT "bin")
else()
set(HAVE_FASTCV FALSE CACHE BOOL "FastCV status")
endif()
endif()
if(HAVE_FASTCV)
set(FASTCV_LIBRARY "${FastCV_LIB_PATH}/libfastcvopt.so" CACHE PATH "FastCV library")
endif()
endif()
endif(WITH_FASTCV)