mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Added Clion build section
This commit is contained in:
parent
c4d5812b4f
commit
68f4c3c55e
3 changed files with 50 additions and 2 deletions
|
|
@ -15,6 +15,22 @@
|
|||
"VOXELENGINE_BUILD_TESTS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default-ninja-mingw-windows",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"generator": "Ninja Multi-Config",
|
||||
"binaryDir": "${sourceDir}/build-mingw",
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||
"VCPKG_HOST_TRIPLET": "x64-mingw-static",
|
||||
"VCPKG_TARGET_TRIPLET": "x64-mingw-static",
|
||||
"VOXELENGINE_BUILD_TESTS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default-ninja-gnu-linux",
|
||||
"condition": {
|
||||
|
|
@ -60,6 +76,11 @@
|
|||
"configurePreset": "default-vs-msvc-windows",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "default-ninja-mingw-windows",
|
||||
"configurePreset": "default-ninja-mingw-windows",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "default-ninja-gnu-linux",
|
||||
"configurePreset": "default-ninja-gnu-linux",
|
||||
|
|
|
|||
20
README.md
20
README.md
|
|
@ -152,6 +152,26 @@ cmake --build --preset default-vs-msvc-windows
|
|||
> [!NOTE]
|
||||
> Make sure your `CMakeUserPresets.json` (if used) contains the correct `VCPKG_ROOT` path.
|
||||
|
||||
---
|
||||
### Building with CLion (MinGW / Ninja)
|
||||
|
||||
> [!NOTE]
|
||||
> Requirements: **vcpkg**, **Git**, and **CLion** (bundled with CMake, Ninja and MinGW toolchain).
|
||||
|
||||
> [!WARNING]
|
||||
> Avoid installing tools in paths with spaces (e.g. `Program Files`).
|
||||
> This may break MinGW builds (especially `windres`).
|
||||
|
||||
Install **vcpkg** manually as described in the Visual Studio section.
|
||||
|
||||
|
||||
#### Configure CLion
|
||||
Open the project in CLion and configure CMake profile:
|
||||
```text
|
||||
Settings → Build, Execution, Deployment → CMake
|
||||
```
|
||||
Reload CMake project and build the engine.
|
||||
|
||||
---
|
||||
|
||||
## Build using Docker
|
||||
|
|
|
|||
|
|
@ -37,6 +37,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/"
|
||||
)
|
||||
else()
|
||||
set(LUAJIT_PACKAGE_DIR "$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}")
|
||||
|
||||
if(EXISTS "$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit-2.1")
|
||||
set(LUAJIT_INCLUDE_DIR "$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit-2.1")
|
||||
else()
|
||||
set(LUAJIT_INCLUDE_DIR "$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit")
|
||||
endif()
|
||||
|
||||
add_library(luajit SHARED IMPORTED)
|
||||
set_target_properties(
|
||||
luajit
|
||||
|
|
@ -45,8 +53,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/bin/lua51.dll"
|
||||
IMPORTED_IMPLIB
|
||||
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/lib/lua51.lib"
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"$ENV{VCPKG_ROOT}/packages/luajit_${VCPKG_TARGET_TRIPLET}/include/luajit"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LUAJIT_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue