cmake_minimum_required(VERSION 2.8.11)

project(ui)

#add_custom_target(ui ALL)
add_custom_target(ui)

add_custom_command(TARGET ui PRE_BUILD
	COMMAND mkdir -p ${CMAKE_SOURCE_DIR}/build/html
	COMMAND cd ${CMAKE_SOURCE_DIR}/src/ui/Domo && npm install
	COMMAND cd ${CMAKE_SOURCE_DIR}/src/ui/Domo && npm run build
	COMMAND cp -a ${CMAKE_SOURCE_DIR}/src/ui/Domo/dist/* ${CMAKE_SOURCE_DIR}/build/html/
)
