This a refactoring of the CMake config file to follow best practices:
- A draco-targets.cmake is generated with install(EXPORT ...), and included in
draco-config.cmake.
- For users consuming Draco with add_subdirectory(), a draco::draco alias is provided.
- Removed find-draco.cmake-- CMake couldn't use it anyway due to the file name
not matching CMake expectations for a find script.
Note: this also removes the previous methods of hardcoding the C++ standard in
the Draco build to C++11. Instead of direct manipulation of CMAKE_CXX_STANDARD
target_compile_features() is used. External projects consuming Draco should now
be able to set the standard to a newer version.
Fix windows DLL install location and update the install test with the following
- Use cxx_std_11 compile feature instead of forcing CXX_STANDARD to C++11.
- Move install test prefix handling to test.py (was in the install test CMakeLists.txt).
- Use CMAKE_INSTALL_RPATH and add dylib location to PATH instead of copying
it only on Windows-- makes test more generic and makes install_test much
simpler.
- Fix version file name.
- Fix install path for config and version file.
- Updates the install test to correctly set prefix and allow
CMake's built-in search functionality to work properly.
This replaces test.yml with ci.yml and renames the test to draco-ci.
A Github PR with this all put together exists at the following link:
https://github.com/google/draco/pull/806
An example draco-ci test summary exists at this link:
https://github.com/google/draco/actions/runs/1789061363
- Add the following test configurations in a job named
draco-tests.
test-macos-make-release-shared
test-macos-make-release-static
test-macos-xcode-release-shared
test-macos-xcode-release-static
test-ubuntu-make-release-shared
test-ubuntu-make-release-static
test-windows-msvc-release-shared
test-windows-msvc-release-static
test-windows-make-release-shared
test-windows-make-release-static
Each configuration name is intended to be self documenting.
All configurations build Draco with tests enabled, and then
run the tests.
- Add the following test configurations in a job named
draco-install-tests:
install-test-ubuntu-make
install-test-macos-make
install-test-macos-xcode
install-test-windows-make
install-test-windows-msvc
Each configuration runs test.py in verbose mode to allow for
failure diagnostics.
Some additional changes to make all this work (and improve usability):
- draco-config.cmake now defines DRACO_LIBRARY_DLL and DRACO_FOUND.
- DRACO_LIBRARY_DLL will contain the full path to the Draco DLL on systems that
produce DLL files (aka Windows).
- test.py now streams output in verbose mode
Add a script that builds and installs Draco in shared and static configurations,
and confirms that a simple test application can compile, link and run
successfully using the CMake configuration provided by each Draco installation.
To run the test script:
cd draco/src/draco/tools/install_test
python3 test.py
By default the script runs silently using the default generator for the CMake
executable in the user's path. Verbose output is behind the usual flags (`-v`).
The CMake generator can be specified using the `-G` argument.
The script is known to work with the following generators:
- Unix Makefiles
- MSVC (Visual Studio 16 2019)
- Xcode
- Fixed omission of draco_version.h when installed in static
configurations.
- Remove DracoConfig.cmake: it was broken and we actually use
draco-config.cmake.
- Update FindDraco.cmake so it actually has a chance of working
properly. Fixed usage of find_path() and subsequent related errors.
- Correct the usage of CMakePackageConfigHelpers in installation target setup
and the config template.
- Add a CMake version file.
- Normalize the Draco variables exposed in CMake.
- draco_FOUND -> DRACO_FOUND
- DRACO_INCLUDE_DIRS, draco_INCLUDE_DIRS -> DRACO_INCLUDE_DIR
- DRACO_LIBRARIES, draco_LIBRARIES -> DRACO_LIBRARY
- DRACO_LIBRARY_DIRS, draco_LIBRARY_DIRS -> DRACO_LIBRARY_DIR
- draco_VERSION_STRING -> DRACO_VERSION
- Use full path variants of GNUInstallDirs variables to init our
install paths.
Fixes https://github.com/google/draco/issues/764
* Add install() for draco-version.cmake.
- Add the submodule.
- Update the build to use googletest sources from the submodule.
- Update the github test build checkout action to include submodules.
- Update build instructions to include the submodule update.
Restrict the behavior disallowing the build of both libraries to MSVC. The mingw CMake generators
handle the situation properly:
- Shared library suffix: .dll
- Import library suffix: .a.dll
- Static library suffix: .a
- Move common NDK settings into cmake/toolchains/android-ndk-common.cmake.
- Fix bug in set_variable_if_unset(). Was ignoring variables set via
CMake's command line.
Fixes#475.
Updates require_var() and set_variable_if_unset() to use the
environment values for named variables.
CMake processes toolchain files multiple times, and on some
processing runs cache variables are not available. Environment
variables are always available.
- Stop forcing AS/C/CXX/LINKER flags into the cache.
- Don't cache internal build system variables.
- Fix usages of PARENT_SCOPE rendered incorrect by previous
patch.
- Fix usage of local variables within if() statements in macros;
functions appear to allow for omission of ${} around vars in
simple boolean checks. Macros apparently require ${} for all
usages of if().
Convert the flag controlling functions to macros and omit the
FORCE argument from all the set() calls. The use of FORCE was
mainly intended to set the variable in all scopes, but using
macros instead of functions is a much cleaner method of achieving
the same goal.
-Increase version to 1.0.1
-Update Javascript decode timing example
-Fix async creation of DracoDecoderModule
-fixes wasm parallel decoding
-Introduce base class for geometric normal predictor
-Added integer attribute interface to JavaScript decoder
-Move loading Draco decoder into three.js Draco loader
-Add compiler launcher support to CMake build
-Add sanitizer support via CMake build
-Check we are not reading past the end of the attribute buffer
The latest version of Draco brings many new enhancements to improve the
development experience:
* Stable API release
* Support for npm Javascript package management
* Javascript based encoder
* Generalized metadata for meshes and point clouds
* Now supporting material properties included along with encoded file
* Improved compression rates:
* 15% better compression on smaller models
* 40% better compression of normals
* Performance improvements (~10% faster encoding, decoding)
* Reduced GPU memory usage:
* Option to store decoded quantized attributes
* Support for triangle strip connectivity on decoded meshes
* iOS 9 Javascript decoder
* Bitstream specification now available