mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
0d47dd19ab
Draw using braille and block characters on a grid.
20 lines
603 B
CMake
20 lines
603 B
CMake
set(EXAMPLES_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
function(example name)
|
|
add_executable(ftxui_example_${name} ${name}.cpp)
|
|
target_link_libraries(ftxui_example_${name} PUBLIC ${DIRECTORY_LIB})
|
|
file(RELATIVE_PATH dir ${EXAMPLES_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
set_property(GLOBAL APPEND PROPERTY FTXUI::EXAMPLES ${dir}/${name})
|
|
endfunction(example)
|
|
|
|
add_subdirectory(component)
|
|
add_subdirectory(dom)
|
|
|
|
if (EMSCRIPTEN)
|
|
get_property(EXAMPLES GLOBAL PROPERTY FTXUI::EXAMPLES)
|
|
foreach(file
|
|
"index.html"
|
|
"run_webassembly.py")
|
|
configure_file(${file} ${file})
|
|
endforeach(file)
|
|
endif()
|