当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
4 Star 17 Fork 5

ShenMian/clementine
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
ShenMian 提交于 2023-02-16 18:50 . .
# Copyright 2023 ShenMian
# License(Apache-2.0)
cmake_minimum_required(VERSION 3.16)
if(NOT DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
if(NOT DEFINED CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()
# SET(CMAKE_CXX_COMPILER_WORKS 1)
project(clementine
VERSION 0.0.0
DESCRIPTION "A simple game engine."
HOMEPAGE_URL "https://github.com/ShenMian/clementine"
LANGUAGES CXX C)
option(USE_CONAN "Use conan" ON)
option(USE_VCPKG "Use vcpkg" OFF)
option(BUILD_TESTS "Build tests" ON)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options (-fdiagnostics-color=always)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options (-fcolor-diagnostics)
endif()
include(scripts/display_info.cmake)
if(USE_CONAN AND EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/lib")
if(WIN32)
list(APPEND CLEMENTINE_DEFINES _CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS UNICODE _UNICODE NOMINMAX) # 指定 Win32 下要定义的宏
endif()
if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") # 静态链接 MSVC 运行库
endif()
if(UNIX)
if(OS_PRETTY_NAME MATCHES "Ubuntu")
set(UBUNTU true)
endif()
add_link_options("-ldl" "-lpthread")
endif()
add_subdirectory(src/engine)
add_subdirectory(src/editor)
if(BUILD_TESTS )
add_subdirectory(tests)
endif()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/ShenMian/Clementine.git
git@gitee.com:ShenMian/Clementine.git
ShenMian
Clementine
clementine
main

搜索帮助