cmake編譯指定自己編譯的庫路徑

彭城老朽發表於2024-04-13
cmake_minimum_required(VERSION 3.16.3)
project(TestCVDNN VERSION 1.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(OpenCV_DIR "/home/XXXX/opencv470_install/lib/cmake/opencv4")
find_package(OpenCV REQUIRED NO_DEFAULT_PATH)
include_directories( ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/utils)
target_link_libraries( ${TARGET_APP_OR_LIB} ${OpenCV_LIBS})

相關文章