zoukankan      html  css  js  c++  java
  • cmake语法学习

    cmake_minimum_required(VERSION 3.5)
    
    # Set the project name
    project (third_party_include)
    
    # testing code
    find_package(OpenCV)
    message("OpenCV_INCLUDE_DIRS = ${OpenCV_INCLUDE_DIRS}")
    message("OpenCV_LIBRARIES = ${OpenCV_LIBRARIES}")
    
    if(OpenCV_FOUND)
        message ("OpenCV found")
    endif()
    
    
    # find a boost install with the libraries filesystem and system
    find_package(Boost 1.46.1 REQUIRED COMPONENTS filesystem system)
    
    # check if boost was found
    if(Boost_FOUND)
        message ("boost found")
    else()
        message (FATAL_ERROR "Cannot find Boost")
    endif()
    
    # Add an executable
    add_executable(third_party_include main.cpp)
    
    # link against the boost libraries
    target_link_libraries( third_party_include
        PRIVATE
            Boost::filesystem
    )

    *

    find_package(OpenCV)

    - OpenCV is ok. Please note that "opencv" or "OPENCV" is not avaliable input.

    - XXXX_INCLUDE_DIRS will be defined if XXXX has beed found!

    - XXXX_LIBRARIES will be defined if XXXX has beed found!

    - XXXX_FOUND will be true, if XXXX has beed found!

    As you can see, loads of kept variables will be inner-defined by CMake. It is pretty confusing.

    Please check the website of CMake to find out the variables you might need in your CMakeList.txt.

    XXXX

  • 相关阅读:
    外部程序启动App
    简单修改文件名python脚本
    监听软键盘的显示
    ActionBar 笔记
    ActionBar 笔记
    Android Lock Pattern 图案解锁
    通过反射实现圆角ImageView
    android 通过命令行启动Apk
    ubuntu svn rabbitvcs 安装
    Android 两个界面间快速切换时,会发现有短暂黑屏
  • 原文地址:https://www.cnblogs.com/alexYuin/p/12778046.html
Copyright © 2011-2022 走看看