zig template
This commit is contained in:
@@ -287,6 +287,24 @@ function(link_deps target)
|
||||
endfunction()
|
||||
|
||||
|
||||
function(put_townengine output_directory)
|
||||
cmake_path(GET TWN_OUT_DIR STEM LAST_ONLY target)
|
||||
|
||||
add_executable(${target} ${TWN_ROOT_DIR}/src/twn_main.c)
|
||||
target_link_options(${target} PRIVATE $<$<BOOL:${LINUX}>:-Wl,-rpath,$ORIGIN/>)
|
||||
set_target_properties(${TWN_TARGET} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${output_directory})
|
||||
set_target_properties(${target} PROPERTIES
|
||||
OUTPUT_NAME ${target}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${output_directory}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${output_directory})
|
||||
give_options(${target})
|
||||
include_deps(${target})
|
||||
link_deps(${target})
|
||||
target_link_libraries(${target} PUBLIC ${TWN_TARGET})
|
||||
endfunction()
|
||||
|
||||
|
||||
function(use_townengine sources output_directory)
|
||||
cmake_path(GET TWN_OUT_DIR STEM LAST_ONLY target)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user