/apps/templates/zig: depend on /src/*.zig sources for rebuilding, add .gitignore
This commit is contained in:
parent
829ff4780c
commit
90f4097070
19
apps/templates/zig/.gitignore
vendored
Normal file
19
apps/templates/zig/.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# ignore executables
|
||||||
|
*
|
||||||
|
!*.*
|
||||||
|
!*/
|
||||||
|
|
||||||
|
**/*.so
|
||||||
|
**/*.dll
|
||||||
|
**/*.exe
|
||||||
|
**/*.trace
|
||||||
|
**/*.js
|
||||||
|
**/*.wasm
|
||||||
|
**/*.wasm.map
|
||||||
|
**/*.data
|
||||||
|
**/*.html
|
||||||
|
|
||||||
|
data/scripts/twnapi.lua
|
||||||
|
build/
|
||||||
|
.zig-cache/
|
||||||
|
zig-out/
|
@ -10,12 +10,14 @@ add_subdirectory($ENV{TWNROOT} ${CMAKE_BINARY_DIR}/twn)
|
|||||||
cmake_path(GET CMAKE_SOURCE_DIR STEM LAST_ONLY GAME_PROJECT_NAME)
|
cmake_path(GET CMAKE_SOURCE_DIR STEM LAST_ONLY GAME_PROJECT_NAME)
|
||||||
put_townengine(${CMAKE_CURRENT_SOURCE_DIR})
|
put_townengine(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
file(GLOB_RECURSE zig-sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.zig)
|
||||||
|
|
||||||
# TODO: support static build
|
# TODO: support static build
|
||||||
# TODO: propagate release switches
|
# TODO: propagate release switches
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/libgame.so
|
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/libgame.so
|
||||||
COMMAND env zig build
|
COMMAND env zig build
|
||||||
DEPENDS ${TWN_TARGET}
|
DEPENDS ${TWN_TARGET} ${zig-sources}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
|
Loading…
Reference in New Issue
Block a user