1 Star 0 Fork 10

faint123/fluffos

forked from mudren/fluffos 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMakeLists.txt 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
Yucong Sun 提交于 2021-04-29 17:09 . TLS support for websocket / telnet
# v2019 is targeted to ubuntu 18.04 LTS, it ships with cmake 3.10
cmake_minimum_required(VERSION 3.10)
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
project(fluffos
DESCRIPTION "FluffOS LPC Driver"
LANGUAGES C CXX)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
# Default Build Type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "..." FORCE)
endif()
if(WIN32)
# minimal support version is Windows 7
add_compile_options("-DWINVER=0x0601")
add_compile_options("-D_WIN32_WINNT=0x0601")
add_compile_options("-D_UNICODE")
add_compile_options("-DUNICODE")
endif()
#
# Try to find the current Git hash
#
find_package(Git)
if(GIT_EXECUTABLE)
execute_process(
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND "${GIT_EXECUTABLE}" describe --tags --always
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(PROJECT_VERSION ${GIT_HASH})
message("Git commit hash: ${PROJECT_VERSION}")
endif()
message("FluffOS ${PROJECT_VERSION} (${CMAKE_BUILD_TYPE})")
foreach(lang C CXX)
message(" ${lang}: '${CMAKE_${lang}_COMPILER}' (${CMAKE_${lang}_COMPILER_ID} ${CMAKE_${lang}_COMPILER_VERSION})")
endforeach()
message("Building on: '${CMAKE_HOST_SYSTEM}' for '${CMAKE_SYSTEM}'")
message("Installing to ${CMAKE_INSTALL_PREFIX}")
add_subdirectory(src)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/faint123/fluffos.git
git@gitee.com:faint123/fluffos.git
faint123
fluffos
fluffos
master

搜索帮助