1 Star 0 Fork 1

ForeverCyril/ThunderRaid

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
ForeverCyril 提交于 2022-01-24 22:23 +08:00 . submit version
cmake_minimum_required(VERSION 3.16)
project(ThunderRaid VERSION 1.0.0 LANGUAGES CXX)
if (MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.29.30129 AND CMAKE_VERSION VERSION_GREATER 3.20.3)
# this change happened in CMake 3.20.4
set(CMAKE_CXX_STANDARD 23) # /std:c++latest - unlocks the non stable cpp20 features. For new 16.11 versions
else ()
set(CMAKE_CXX_STANDARD 20) # /std:c++latest for msvc and -std=c++20 for everyone else.
endif ()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if (MSVC)
add_compile_options(/utf-8)
set(WIN32_RC "${CMAKE_BINARY_DIR}/app_win32.rc")
configure_file("${CMAKE_SOURCE_DIR}/app_win32.rc.in"
"${WIN32_RC}")
endif ()
find_package(Qt6 COMPONENTS Widgets Multimedia REQUIRED)
file(GLOB_RECURSE source_files ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
if(MSVC)
add_executable(ThunderRaid ${source_files} ${WIN32_RC})
else()
add_executable(ThunderRaid ${source_files})
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set_property(TARGET ThunderRaid PROPERTY WIN32_EXECUTABLE true)
endif()
qt_add_binary_resources(resources res/res.qrc OPTIONS -no-compress)
add_dependencies(ThunderRaid resources)
target_link_libraries(ThunderRaid PRIVATE Qt6::Widgets Qt6::Multimedia)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/forevercyril/thunder-raid.git
git@gitee.com:forevercyril/thunder-raid.git
forevercyril
thunder-raid
ThunderRaid
master

搜索帮助