Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5084d65
refactor: remove useless code
FlyAndNotDown Oct 14, 2025
5eb0c34
refactor: use interface library target to manager 3rd party libs
FlyAndNotDown Oct 16, 2025
551ed22
refactor: use subproject to replace hard code engine string in cmake
FlyAndNotDown Oct 24, 2025
df33b49
refactor: rename arch flag
FlyAndNotDown Oct 26, 2025
322233c
refactor: skip private libs' install
FlyAndNotDown Oct 26, 2025
51fe9f0
feat: support install third party libs
FlyAndNotDown Oct 26, 2025
26260e3
feat: export targets for install
FlyAndNotDown Oct 27, 2025
ec2acfc
refactor: move engine third party cmake code
FlyAndNotDown Oct 31, 2025
eba6cc4
refactor: misc update
FlyAndNotDown Nov 4, 2025
3487292
feat: add vcpkg manifest
FlyAndNotDown Nov 4, 2025
020ba74
del: fuck vcpkg
FlyAndNotDown Nov 5, 2025
c47d625
refactor: not export 3rd packages in cmake
FlyAndNotDown Nov 7, 2025
2253e27
refactor: support private lib linkages and merged lib linkages
FlyAndNotDown Nov 7, 2025
32ba460
refactor: support install header only packages manually for includes …
FlyAndNotDown Nov 8, 2025
185f6af
refactor: process 3rd runtime dependencies
FlyAndNotDown Nov 8, 2025
f1405f5
refactor: targets output
FlyAndNotDown Nov 8, 2025
68baeea
refactor: runtime dependencies copy
FlyAndNotDown Nov 8, 2025
b9362c8
fix: debug build
FlyAndNotDown Nov 15, 2025
91fc8c1
refactor: make msvc compile options private
FlyAndNotDown Nov 15, 2025
9552347
refactor: cmake code style
FlyAndNotDown Nov 23, 2025
4871b28
fix: macos build
FlyAndNotDown Nov 23, 2025
1b68289
ci: setup node.js
FlyAndNotDown Nov 23, 2025
42a711a
fix: msvc install
FlyAndNotDown Nov 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
Expand Down
29 changes: 6 additions & 23 deletions CMake/Common.cmake
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
option(BUILD_EDITOR "Build Explosion editor" ON)
option(CI "Build in CI" OFF)
include(ExternalProject)
include(GenerateExportHeader)

option(USE_UNITY_BUILD "Use unity build" ON)
option(EXPORT_COMPILE_COMMANDS "Whether to export all compile commands" OFF)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_UNITY_BUILD ${USE_UNITY_BUILD})
set(CMAKE_EXPORT_COMPILE_COMMANDS ${EXPORT_COMPILE_COMMANDS})

get_cmake_property(GENERATOR_IS_MULTI_CONFIG GENERATOR_IS_MULTI_CONFIG)
if (${GENERATOR_IS_MULTI_CONFIG})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Dist/$<CONFIG>/Engine/Binaries)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Dist/$<CONFIG>/Engine/Binaries)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Lib)
else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Dist/Engine/Binaries)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Dist/Engine/Binaries)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Lib)
endif ()

get_cmake_property(generator_is_multi_config GENERATOR_IS_MULTI_CONFIG)
if (${CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT})
if (${GENERATOR_IS_MULTI_CONFIG})
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install/$<CONFIG> CACHE PATH "" FORCE)
else ()
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install CACHE PATH "" FORCE)
endif ()
# TODO support multi config generator for CMAKE_INSTALL_PREFIX
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install CACHE PATH "" FORCE)
endif()

add_definitions(-DENGINE_CMAKE_SOURCE_DIRECTORY="${CMAKE_SOURCE_DIR}")
add_definitions(-DENGINE_CMAKE_BINARY_DIRECTORY="${CMAKE_BINARY_DIR}")

add_definitions(-DBUILD_CONFIG_DEBUG=$<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,1,0>)

add_definitions(-DPLATFORM_WINDOWS=$<IF:$<PLATFORM_ID:Windows>,1,0>)
Expand All @@ -39,8 +24,6 @@ add_definitions(-DCOMPILER_MSVC=$<IF:$<CXX_COMPILER_ID:MSVC>,1,0>)
add_definitions(-DCOMPILER_APPLE_CLANG=$<IF:$<CXX_COMPILER_ID:AppleClang>,1,0>)
add_definitions(-DCOMPILER_GCC=$<IF:$<CXX_COMPILER_ID:GNU>,1,0>)

add_definitions(-DBUILD_EDITOR=$<BOOL:BUILD_EDITOR>)

if (${MSVC})
add_compile_options(/bigobj)
add_definitions(-D_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS=1)
Expand Down
Loading