Count_People/C++/CMakeLists.txt

60 lines
1.7 KiB
CMake

cmake_minimum_required(VERSION 3.16.3)
project(yolo_bytetrack)
#
set(TOOLCHAIN_DIR /home/huey/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/arm-linux-gnueabihf-g++)
set(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/arm-linux-gnueabihf-gcc)
set(OpenCV_DIR /home/huey/opencv-4.7.0/install/lib/cmake/opencv4) # 填入OpenCVConfig.cmake
find_package(OpenCV 4 REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
set(OPENSSL_ROOT_DIR /home/huey/openssl/install/include/)
set(OPENSSL_SSL_LIBRARY /home/huey/openssl/install/lib/libssl.so)
set(OPENSSL_CRYPTO_LIBRARY /home/huey/openssl/install/lib/libcrypto.so)
set(pkgcfg_lib__OPENSSL_crypto /home/huey/openssl/install/lib/libcrypto.so)
set(pkgcfg_lib__OPENSSL_ssl /home/huey/openssl/install/lib/libssl.so)
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
# install target and libraries
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install/rknn_yolov5_1109_new_${CMAKE_SYSTEM_NAME})
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(
include_libs
"${PROJECT_SOURCE_DIR}/include"
${PROJECT_SOURCE_DIR}/3rdparty/librknn_api/include
${PROJECT_SOURCE_DIR}/3rdparty/rga/include
)
include_directories(${include_libs})
add_executable(yolo_bytetrack
src/bytetrack.cpp
src/BYTETracker.cpp
src/kalmanFilter.cpp
src/lapjv.cpp
src/STrack.cpp
src/utils.cpp
)
set(
link_libs pthread
${PROJECT_SOURCE_DIR}/3rdparty/librknn_api/armhf/librknn_api.so
${PROJECT_SOURCE_DIR}/3rdparty/rga/lib/librga.so
)
target_link_libraries(yolo_bytetrack
${OpenCV_LIBS}
${OPENSSL_LIBRARIES}
${link_libs}
)