Remove old method for JS doc generation.
The new way is to follow the instructions at the top of `web/docs/build.py`. The option in build.sh has been unused for a while. Invoking Python from CMake was pointless, especially since I don't want to force other developers to install a specific version of Python etc.
This commit is contained in:
@@ -86,7 +86,6 @@ The following CMake options are boolean options specific to Filament:
|
||||
- `FILAMENT_BUILD_FILAMAT`: Build filamat and JNI buildings
|
||||
- `FILAMENT_SUPPORTS_METAL`: Include the Metal backend
|
||||
- `FILAMENT_SUPPORTS_VULKAN`: Include the Vulkan backend
|
||||
- `FILAMENT_GENERATE_JS_DOCS`: Build WebGL documentation and tutorials
|
||||
- `FILAMENT_INSTALL_BACKEND_TEST`: Install the backend test library so it can be consumed on iOS
|
||||
- `FILAMENT_USE_EXTERNAL_GLES3`: Experimental: Compile Filament against OpenGL ES 3
|
||||
- `FILAMENT_USE_SWIFTSHADER`: Experimental: Compile Filament against SwiftShader
|
||||
|
||||
@@ -17,8 +17,6 @@ option(FILAMENT_USE_EXTERNAL_GLES3 "Experimental: Compile Filament against OpenG
|
||||
|
||||
option(FILAMENT_USE_SWIFTSHADER "Experimental: Compile Filament against SwiftShader" OFF)
|
||||
|
||||
option(FILAMENT_GENERATE_JS_DOCS "Build WebGL documentation and tutorials" OFF)
|
||||
|
||||
option(FILAMENT_ENABLE_LTO "Enable link-time optimizations if supported by the compiler" OFF)
|
||||
|
||||
option(FILAMENT_SKIP_SAMPLES "Don't build samples" OFF)
|
||||
@@ -580,11 +578,6 @@ set(FILAMENT_SAMPLES_BINARY_DIR ${PROJECT_BINARY_DIR}/samples)
|
||||
if (WEBGL)
|
||||
add_subdirectory(web/filament-js)
|
||||
add_subdirectory(web/samples)
|
||||
|
||||
if (FILAMENT_GENERATE_JS_DOCS)
|
||||
add_subdirectory(web/docs)
|
||||
endif()
|
||||
|
||||
add_subdirectory(${EXTERNAL}/imgui/tnt)
|
||||
endif()
|
||||
|
||||
|
||||
3
build.sh
3
build.sh
@@ -109,8 +109,6 @@ ISSUE_WEB_DOCS=false
|
||||
|
||||
RUN_TESTS=false
|
||||
|
||||
JS_DOCS_OPTION="-DGENERATE_JS_DOCS=OFF"
|
||||
|
||||
FILAMENT_ENABLE_JAVA=ON
|
||||
|
||||
INSTALL_COMMAND=
|
||||
@@ -220,7 +218,6 @@ function build_webgl_with_target {
|
||||
-DCMAKE_BUILD_TYPE="$1" \
|
||||
-DCMAKE_INSTALL_PREFIX="../webgl-${lc_target}/filament" \
|
||||
-DWEBGL=1 \
|
||||
${JS_DOCS_OPTION} \
|
||||
../..
|
||||
${BUILD_COMMAND} ${BUILD_TARGETS}
|
||||
)
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(webdocs)
|
||||
|
||||
# We do not use CMake's find_package facility because it can't find homebrew-installed python3,
|
||||
# or the python3 executable on some corporate Linux machines.
|
||||
find_program(PYTHON3 python3)
|
||||
|
||||
if(${PYTHON3} STREQUAL "PYTHON3-NOTFOUND")
|
||||
message(WARNING "Python 3 not found, skipping web doc generation.")
|
||||
else()
|
||||
|
||||
file(STRINGS tutorials.txt TUTORIALS)
|
||||
|
||||
set(CUSTOM_OUTPUTS)
|
||||
set(CUSTOM_INPUTS)
|
||||
foreach (NAME ${TUTORIALS})
|
||||
list(APPEND CUSTOM_OUTPUTS ${PROJECT_BINARY_DIR}/demo_${NAME}.html)
|
||||
list(APPEND CUSTOM_OUTPUTS ${PROJECT_BINARY_DIR}/tutorial_${NAME}.html)
|
||||
list(APPEND CUSTOM_OUTPUTS ${PROJECT_BINARY_DIR}/tutorial_${NAME}.js)
|
||||
list(APPEND CUSTOM_INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_${NAME}.md)
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CUSTOM_OUTPUTS}
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/build.py
|
||||
--output-folder ${PROJECT_BINARY_DIR}
|
||||
--build-folder ${PROJECT_BINARY_DIR}/../..
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/build.py
|
||||
DEPENDS ${CUSTOM_INPUTS} filament-js websamples)
|
||||
|
||||
add_custom_target(${PROJECT_NAME} ALL DEPENDS ${CUSTOM_OUTPUTS})
|
||||
|
||||
endif()
|
||||
Reference in New Issue
Block a user