• cmake


    project config

    cmake_minimum_required(VERSION 3.15)
    project(smart_isp VERSION 1.0)

    compile config

    set(CMAKE_BUILD_TYPE "Debug")
    set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
    set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
    set(CMAKE_CXX_STANDARD 14)

    project sources files config

    include_directories(${PROJECT_SOURCE_DIR}/3rdparty/cJSON
    ${PROJECT_SOURCE_DIR}/src
    ${PROJECT_SOURCE_DIR}/src/common
    ${PROJECT_SOURCE_DIR}/src/flow_config)
    aux_source_directory(${PROJECT_SOURCE_DIR}/3rdparty/cJSON ALL_SRCS)
    aux_source_directory(${PROJECT_SOURCE_DIR}/src ALL_SRCS)
    aux_source_directory(${PROJECT_SOURCE_DIR}/src/common ALL_SRCS)

    3rdparty lib config

    set(OpenCV_DIR $ENV{OPENCV_HOME})
    find_package(OpenCV REQUIRED)
    if(${OpenCV})
    message(STATUS "OpenCV library status:")
    message(STATUS "version: ${OpenCV_VERSION}")
    message(STATUS "libraries: ${OpenCV_LIBS}")
    message(STATUS "include path: ${OpenCV_INCLUDE_DIRS}")
    endif()
    include_directories(${OpenCV_INCLUDE_DIRS})
    link_directories(${OpenCV_LIBRARY_DIRS})

    sub module lib compile config

    config subdir CMakeLists.txt first

    add_subdirectory(src/xxx)

    internal libray config

    link_directories(${PROJECT_SOURCE_DIR}/lib)

    set(EXTRA_LIBS ${MY_LIBS} xxxlib yyylib)

    executable file config

    add_executable(smart_isp ${ALL_SRCS})
    target_link_libraries(smart_isp ${OpenCV_LIBS})

    output dir config

    SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
    SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

  • 相关阅读:
    Wolfram常用计算
    soapUI接口关联教程
    时间序列预测线上充值数据
    基于MySQL分析线上充值留存率
    更改用户资料需要完善脚本
    MySQL建立RFM模型
    Scrcpy使用入门
    虾皮Shopee社招面经分享(大数据开发方向),附内推方式
    MySQL Binlog 解析工具 Maxwell 详解
    MySQL Binlog 介绍
  • 原文地址:https://www.cnblogs.com/wnwin/p/12938451.html
Copyright © 2020-2023  润新知