代码拉取完成,页面将自动刷新
#***************************************************************************
# @file CMakeLists.txt
# @author itas109 (itas109@qq.com) \n\n
# Blog : https://blog.csdn.net/itas109 \n
# Github : https://github.com/itas109 \n
# Gitee : https://gitee.com/itas109 \n
# QQ Group : 12951803
# @brief Lightweight cross-platform serial port library based on C++
# @copyright The CSerialPort is Copyright (C) 2014 itas109 <itas109@qq.com>.
# You may use, copy, modify, and distribute the CSerialPort, under the terms
# of the LICENSE file.
############################################################################
cmake_minimum_required(VERSION 2.8.12)
project(CSerialPort LANGUAGES CXX)
# set output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# set build tpye
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(CSERIALPORT_BUILD_EXAMPLES "Build CSerialPort examples" ON)
option(CSERIALPORT_BUILD_TEST "Build CSerialPort Test" OFF)
message(STATUS "CSerialPort CMake Info")
message(STATUS "=======================================================")
message(STATUS " Operation System : ${CMAKE_SYSTEM}")
message(STATUS " CPU Architecture : ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS " Build Type : ${CMAKE_BUILD_TYPE}")
message(STATUS " Shared Library : ${BUILD_SHARED_LIBS}")
message(STATUS " Build Examples : ${CSERIALPORT_BUILD_EXAMPLES}")
message(STATUS " Build Test : ${CSERIALPORT_BUILD_TEST}")
message(STATUS "=======================================================")
# libcserialport
add_subdirectory(lib)
# examples
if (CSERIALPORT_BUILD_EXAMPLES)
add_subdirectory(examples)
endif ()
# test
if (CSERIALPORT_BUILD_TEST)
add_subdirectory(test)
endif ()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。