<commit_before>add_granite_application(gltf-viewer viewer.cpp)
add_granite_headless_application(gltf-viewer-headless viewer.cpp)

target_link_libraries(gltf-viewer PRIVATE granite-scene-viewer)
target_link_libraries(gltf-viewer-headless PRIVATE granite-scene-viewer)

if (NOT ANDROID)
    target_compile_definitions(gltf-viewer PRIVATE ASSET_DIRECTORY=\"${CMAKE_CURRENT_SOURCE_DIR}/assets\")
    target_compile_definitions(gltf-viewer-headless PRIVATE ASSET_DIRECTORY=\"${CMAKE_CURRENT_SOURCE_DIR}/assets\")
    if (GRANITE_INSTALL_EXE_TARGETS)
        install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets DESTINATION bin)
        install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../assets DESTINATION bin/builtin)
    endif()
endif()

if (GRANITE_BULLET)
    add_granite_application(physics-sandbox physics_sandbox.cpp)
    target_link_libraries(physics-sandbox PRIVATE granite-physics)
    if (NOT ANDROID)
        target_compile_definitions(physics-sandbox PRIVATE ASSET_DIRECTORY=\"${CMAKE_CURRENT_SOURCE_DIR}/assets\")
    endif()
endif()

#install_assets(gltf-viewer ${CMAKE_CURRENT_SOURCE_DIR}/assets ${CMAKE_CURRENT_SOURCE_DIR}/../assets/app)
#install_assets(gltf-viewer ${CMAKE_CURRENT_SOURCE_DIR}/../app/assets/builtin ${CMAKE_CURRENT_SOURCE_DIR}/../assets)<commit_msg>Add option to install viewer application.<commit_after>add_granite_application(gltf-viewer viewer.cpp)
add_granite_headless_application(gltf-viewer-headless viewer.cpp)

target_link_libraries(gltf-viewer PRIVATE granite-scene-viewer)
target_link_libraries(gltf-viewer-headless PRIVATE granite-scene-viewer)

if (NOT ANDROID)
    target_compile_definitions(gltf-viewer PRIVATE ASSET_DIRECTORY=\"${CMAKE_CURRENT_SOURCE_DIR}/assets\")
    target_compile_definitions(gltf-viewer-headless PRIVATE ASSET_DIRECTORY=\"${CMAKE_CURRENT_SOURCE_DIR}/assets\")
    if (GRANITE_INSTALL_EXE_TARGETS)
        install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets DESTINATION bin)
        install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../assets DESTINATION bin/builtin)
    endif()
endif()

if (GRANITE_BULLET)
    add_granite_application(physics-sandbox physics_sandbox.cpp)
    target_link_libraries(physics-sandbox PRIVATE granite-physics)
    if (NOT ANDROID)
        target_compile_definitions(physics-sandbox PRIVATE ASSET_DIRECTORY=\"${CMAKE_CURRENT_SOURCE_DIR}/assets\")
    endif()
endif()

option(GRANITE_VIEWER_INSTALL "Install Granite viewer and assets." OFF)

if (GRANITE_VIEWER_INSTALL)
    granite_install_executable(gltf-viewer)
    granite_install_executable(gltf-viewer-headless)
    install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets DESTINATION ${CMAKE_INSTALL_BINDIR})
    install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../assets DESTINATION ${CMAKE_INSTALL_BINDIR}/builtin)
endif()
{'fraction_non_alphanumeric': 0.09956553222302679, 'fraction_numerical': 0.0, 'mean_word_length': 6.717877094972067, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2604273', 'n_tokens_mistral': 996, 'n_tokens_neox': 932, 'n_words': 122}