This commit is contained in:
wcjbr
2026-08-16 13:32:51 +08:00
parent 9b5d76a6ac
commit d36fd6d2ee
25 changed files with 2836 additions and 4 deletions
+25
View File
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.10.0)
project(opencge VERSION 0.1.0 LANGUAGES C CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_library(opencge STATIC
src/opencge.cpp
src/game.cpp
src/render.cpp
src/config.cpp
src/engine.cpp
)
target_include_directories(opencge PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_compile_features(opencge PUBLIC cxx_std_17)
find_package(glfw3 REQUIRED)
find_package(Vulkan REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP REQUIRED IMPORTED_TARGET jsoncpp)
target_link_libraries(opencge PUBLIC glfw Vulkan::Vulkan PkgConfig::JSONCPP)
add_executable(square_example examples/square/main.cpp)
target_link_libraries(square_example PRIVATE opencge)
add_executable(opencge_engine src/engine_main.cpp)
target_link_libraries(opencge_engine PRIVATE opencge)