| 1 |
add_executable(to_c_array EXCLUDE_FROM_ALL to_c_array.cpp) |
| 2 |
configure_target_cc_props(to_c_array) |
| 3 |
|
| 4 |
add_custom_command( |
| 5 |
COMMENT "Packing std.jsonnet into std.jsonnet.h" |
| 6 |
COMMAND |
| 7 |
to_c_array |
| 8 |
"${CMAKE_CURRENT_SOURCE_DIR}/std.jsonnet" |
| 9 |
"${CMAKE_CURRENT_BINARY_DIR}/std.jsonnet.h" |
| 10 |
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/std.jsonnet.h" |
| 11 |
MAIN_DEPENDENCY std.jsonnet |
| 12 |
DEPENDS to_c_array) |
| 13 |
|
| 14 |
add_library(stdlib_h INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/std.jsonnet.h") |
| 15 |
target_include_directories(stdlib_h INTERFACE "${CMAKE_CURRENT_BINARY_DIR}") |