Files
Boundard/CMakeLists.txt
T
2026-08-16 13:32:51 +08:00

26 lines
825 B
CMake

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)