Initial native OpenSim viewer prototype

This commit is contained in:
2026-03-10 19:54:09 +08:00
commit c382cfc3df
425 changed files with 91147 additions and 0 deletions
+99
View File
@@ -0,0 +1,99 @@
// CLI11: Version {version}
// Originally designed by Henry Schreiner
// https://github.com/CLIUtils/CLI11
//
// This is a standalone header file generated by MakeSingleHeader.py in CLI11/scripts
// from: {git}
//
// CLI11 {version} Copyright (c) 2017-2025 University of Cincinnati, developed by Henry
// Schreiner under NSF AWARD 1414736. All rights reserved.
//
// Redistribution and use in source and binary forms of CLI11, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once
// Standard combined includes:
{public_includes}
{version_hpp}
{macros_hpp}
{validators_hpp_filesystem}
{encoding_includes}
{argv_inl_includes}
namespace {namespace} {{
{encoding_hpp}
{encoding_inl_hpp}
{argv_hpp}
{argv_inl_hpp}
{string_tools_hpp}
{string_tools_inl_hpp}
{error_hpp}
{type_tools_hpp}
{split_hpp}
{split_inl_hpp}
{config_fwd_hpp}
{validators_hpp}
{validators_inl_hpp}
{extra_validators_hpp}
{extra_validators_inl_hpp}
{formatter_fwd_hpp}
{option_hpp}
{option_inl_hpp}
{app_hpp}
{app_inl_hpp}
{config_hpp}
{config_inl_hpp}
{formatter_hpp}
{formatter_inl_hpp}
}} // namespace {namespace}
+31
View File
@@ -0,0 +1,31 @@
if(CLI11_SINGLE_FILE)
# Single file test
find_package(
Python
COMPONENTS Interpreter
REQUIRED)
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/single-include")
add_custom_command(
OUTPUT "${PROJECT_BINARY_DIR}/single-include/CLI11.hpp"
COMMAND
Python::Interpreter "${PROJECT_SOURCE_DIR}/scripts/MakeSingleHeader.py" ${CLI11_headers}
${CLI11_impl_headers} --main "${CMAKE_CURRENT_SOURCE_DIR}/CLI11.hpp.in" --output
"${PROJECT_BINARY_DIR}/single-include/CLI11.hpp" --version "${CLI11_VERSION}"
DEPENDS "${PROJECT_SOURCE_DIR}/include/CLI/CLI.hpp" CLI11.hpp.in ${CLI11_headers}
${CLI11_impl_headers})
add_custom_target(CLI11-generate-single-file ALL
DEPENDS "${PROJECT_BINARY_DIR}/single-include/CLI11.hpp")
set_property(TARGET CLI11-generate-single-file PROPERTY FOLDER "Scripts")
if(CLI11_INSTALL OR CLI11_FULL_INSTALL)
install(FILES "${PROJECT_BINARY_DIR}/single-include/CLI11.hpp"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
add_library(CLI11_SINGLE INTERFACE)
target_link_libraries(CLI11_SINGLE INTERFACE CLI11)
add_dependencies(CLI11_SINGLE CLI11-generate-single-file)
target_compile_definitions(CLI11_SINGLE INTERFACE -DCLI11_SINGLE_FILE)
target_include_directories(
CLI11_SINGLE INTERFACE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/single-include/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
endif()
+24
View File
@@ -0,0 +1,24 @@
# Because Meson does not allow outputs to be placed in subfolders, we must have
# meson.build here when generating the single file header so that it is placed
# in the correct location.
pymod = import('python')
prog_python = pymod.find_installation()
single_main_file = files('CLI11.hpp.in')
if use_single_header
single_header = custom_target(
'CLI11.hpp',
input: [files('../scripts/MakeSingleHeader.py'), cli11_headers, cli11_impl_headers],
output: 'CLI11.hpp',
command : [prog_python, '@INPUT@', '--main', single_main_file, '--output', '@OUTPUT@'],
depend_files: [single_main_file],
)
else
# the `declare_dependency` needs to have the single_header source as a source
# dependency, to ensure that the generator runs before any attempts to include
# the header happen. Adding an empty list is an idiomatic way to ensure the
# variable exists but does nothing
single_header = []
endif