zoukankan      html  css  js  c++  java
  • cmake

    # cmake file for duilib
    #Author Qi Gao(monkgau@gmail.com)
    #Created: 2012/09/16
    
    aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} Root_src)
    aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Control Control_src)
    aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Core Core_src)
    aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Layout Layout_src)
    aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Utils Utils_src)
    
    include_directories(${CMAKE_CURRENT_SOURCE_DIR})
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Control)
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Core)
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Layout)
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Utils)
    
    set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
    add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src})
    
    add_definitions(-DUILIB_EXPORTS)
    target_link_libraries(duilib riched20 comctl32)
    set_target_properties(duilib PROPERTIES OUTPUT_NAME "duilib")
    add_custom_command(TARGET duilib POST_BUILD
      COMMAND ${CMAKE_COMMAND} -E copy_if_different
      ${PROJECT_BINARY_DIR}/lib/duilib.dll ${PROJECT_SOURCE_DIR}/bin/duilib.dll)

    参考duilib的cmake

    rtsp的这个

    cmake_minimum_required(VERSION 3.5)
    
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lrt -pthread -lpthread -ldl -lm")
    
    aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/net SRC1)
    
    aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/xop SRC2)
    
    
    
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
    
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/net)
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/xop)
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/3rdpart)
    
    
    add_executable(hello_cmake ${SRC1} ${SRC2} ${CMAKE_CURRENT_SOURCE_DIR}/example/rtsp_h264_file.cpp)
  • 相关阅读:
    let与const的区别
    IOS客户端UIwebview下web页面闪屏问题
    移动端click事件延迟300ms问题
    css3+visbibilty解决淡入淡出问题
    git学习之branch分支
    git学习之冲突解决办法
    webpack+vue-cli项目打包技巧
    一个高级PHP工程师所应该具备的
    多站点
    PHP error_reporting() 错误控制函数功能详解
  • 原文地址:https://www.cnblogs.com/cnchengv/p/15647015.html
Copyright © 2011-2022 走看看