15 lines
531 B
CMake
15 lines
531 B
CMake
# Copyright (c) 2026 Dominic Masters
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
function(dusk_env_to_h INPUT_PATH OUTPUT_NAME_RELATIVE)
|
|
set(DUSK_DEFS_TARGET_NAME "DUSK_DEFS_${OUTPUT_NAME_RELATIVE}")
|
|
dusk_run_python(
|
|
${DUSK_DEFS_TARGET_NAME}
|
|
tools.env_to_h
|
|
--env "${CMAKE_CURRENT_LIST_DIR}/${INPUT_PATH}"
|
|
--output ${DUSK_GENERATED_HEADERS_DIR}/${OUTPUT_NAME_RELATIVE}
|
|
)
|
|
add_dependencies(${DUSK_LIBRARY_TARGET_NAME} ${DUSK_DEFS_TARGET_NAME})
|
|
endfunction() |