1 Star 0 Fork 0

beiklive/MyEasyGame

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
byeaxj 提交于 2023-12-14 16:06 . input listener build finish
cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME "GameEngine")
project(${PROJECT_NAME})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(SPDLOG_NO_THREADS ON)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
set(EASYX_PATH ${CMAKE_SOURCE_DIR}/3rd/EasyX)
# 设置easyX库文件路径
set(EASYX_LIB_PATH ${EASYX_PATH}/lib/x64)
# 设置easyX头文件路径
include_directories(${EASYX_PATH}/include)
file(GLOB_RECURSE SOURCES
src/*.cpp
src/engine/*.cpp
src/object/*.cpp
) # 获取src目录下的所有cpp文件
# 打印找到的.cpp文件
message("find following cpp files")
foreach(source_file ${SOURCES})
message("\t-->\t${source_file}")
endforeach()
add_executable(${PROJECT_NAME}
${SOURCES}
main.cpp
)
# 添加包含目录
target_include_directories(${PROJECT_NAME} PRIVATE
inc
src
${EASYX_PATH}/include
${EASYX_PATH}/lib/x64
)
add_subdirectory(3rd/spdlog)
target_link_libraries(${PROJECT_NAME} PRIVATE
spdlog
)
target_link_libraries(${PROJECT_NAME} PRIVATE EasyXa)
target_link_libraries(${PROJECT_NAME} PRIVATE EasyXw)
# 如果需要使用Windows API,添加下面一行
target_link_libraries(${PROJECT_NAME} PRIVATE gdi32)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/beiklive/my-easy-game.git
git@gitee.com:beiklive/my-easy-game.git
beiklive
my-easy-game
MyEasyGame
flushsystem

搜索帮助

0d507c66 1850385 C8b1a773 1850385