if(EMSCRIPTEN) macro( create_host_index_html filename prog_name) file( WRITE ${filename} " ${prog_name} ") endmacro() # Override add_executable to make webpage instead macro( add_executable prog_name) # Create manifest required for APK create_host_index_html("${CMAKE_CURRENT_BINARY_DIR}/index.html" "${prog_name}") _add_executable(${prog_name} ${ARGN}) endmacro() endif()