53 Commits

Author SHA1 Message Date
Tom Finegan
a6b6ed80c5 Draco v1.5.3 release. 2022-07-06 14:29:21 -07:00
SpaceIm
7109fbee87
cmake: Support modernized import of Draco via draco::draco
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.
2022-04-13 11:00:01 -07:00
SpaceIm
a737103f52
CMake: install draco.dll in bin folder (#838)
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.
2022-04-08 17:06:49 -07:00
Tom Finegan
60af0ba480
Correct the install location for CMake configuration files. (#839)
- 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.
2022-04-08 14:21:24 -07:00
Raymond Hulha
befe2d8809
Add binary STL support. (#802)
Includes support for binary STL and some basic tests.
2022-03-25 14:14:33 -07:00
Tom Finegan
bd1e8de7dd
Draco v1.5.2 release. (#818) 2022-02-17 14:06:05 -08:00
Tom Finegan
9522c22a74
Draco v1.5.1 release. (#812) 2022-02-15 17:13:23 -08:00
Tom Finegan
b7655f7391
Replace the existing test workflow with draco-ci from ci.yml. (#806)
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
2022-02-03 13:05:31 -08:00
Tom Finegan
9fd0a50a6f
Add install target testing. (#796)
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
2022-02-02 16:05:53 -08:00
Tom Finegan
65715581da
Draco v1.5.0 release. (#779) 2021-12-09 11:26:09 -08:00
Tom Finegan
931bafe578
draco: Improve installation and packaging support.
- 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.
2021-12-06 09:58:05 -08:00
Tom Finegan
e5eb9cd3f7 Bump LT_CURRENT.
This should have been included in v1.4.3.

Fixes https://github.com/google/draco/issues/754
2021-11-10 13:50:19 -08:00
Tom Finegan
c880d79457
Add googletest as a git submodule. (#756)
- 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.
2021-10-25 11:06:21 -07:00
Tom Finegan
9f0e5c5f15 Draco v1.4.3 2021-10-12 12:55:36 -07:00
Tom Finegan
194b55a799 draco: Complete the large file support fix in the stdio reader.
Builds on the Windows-only fix added in
https://github.com/google/draco/pull/691
2021-03-12 13:51:42 -08:00
Tom Finegan
cdf1fd20a9
Delete draco_features.cmake
Drop old file. Fixes #687
2021-03-03 08:54:42 -08:00
Andreas Atteneder
a0146686a0 fix: Linking dracodec_unity macOS bundle works again (got broken via #676) 2021-02-05 12:21:05 -08:00
Tom Finegan
5ad118d7d2 draco: Support multiple link flags in older CMakes
Stringify the flag list and apply the flags in CMakes before
v3.13.
2021-02-04 15:42:34 -08:00
Tom Finegan
00134c59b0 draco: Restore sanitizer support. 2021-02-04 15:42:34 -08:00
Quim Muntal
253059c639
Support building mingw static and dynamic at the same time (#677)
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
2021-02-04 12:13:18 -08:00
RichardTea
3ea441ec1c
Set VERSION and SOVERSION for all targets as appropriate (#676)
Set VERSION property for non-static library targets and executable targets, and set
SOVERSION for non-MSVC targets.
2021-02-03 13:57:22 -08:00
Tom Finegan
e812c9e195
Fix typo in CMake macro draco_add_executable()
$lib_NAME -> $exe_NAME.
2020-12-17 12:50:16 -08:00
Tom Finegan
2e67b39c31 Draco v1.4.1 2020-12-08 11:55:42 -08:00
Tom Finegan
dd6ef6ff02
draco: Fix empty list handling in older CMakes.
Older CMake releases don't support empty list variables with list(FILTER).
2020-12-01 14:37:24 -08:00
Tom Finegan
8a979f79a5 Draco v1.4.0 2020-12-01 13:01:33 -08:00
Tom Finegan
dec23f5ac6
Merge pull request #602 from PsycoTodd/iphonesimulator
add toolchain files for ios simulator.
2020-05-05 12:32:48 -07:00
PsychoTodd
cfaf1bebfe add toolchain files for ios simulator. 2020-05-01 20:44:58 -07:00
Robert Buchholz
a3c2d121a4 Update CMake-generated dummy sources only when their content changes
- this prevents unnecessary rebuilds after each CMake run
2020-03-09 13:45:44 +01:00
Frank Galligan
571d547d36 Update to version 1.3.6 2020-03-03 10:35:26 -08:00
Tom Finegan
5db6df1985
draco: formatting fixes in draco_features.cmake.
Just line wrapping stuff.
2019-09-25 14:28:23 -07:00
Robert Buchholz
d7f6ff38b6 Update CMake-generated headers only when their content changes
- this prevents unnecessary decode.cc rebuilds after each CMake run
2019-09-25 11:27:57 +02:00
Tom Finegan
fdaa47cd23 draco cmake: Improve Android NDK toolchain support and fix a bug.
- 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.
2019-06-21 10:50:00 -07:00
Tom Finegan
5a999117b1 draco cmake: Run cmake-format on all CMake files. 2019-06-21 10:47:49 -07:00
Igor Vytyaz
8833cf878e Updated snapshot to 1.3.5
* Added option to build Draco for Universal Scene Description
* Code cleanup
* Bug fixes
2019-01-31 10:18:06 -08:00
Ondrej Stava
79774fec74 Updated snapshot to 1.3.2
- Bug fixes
2018-06-05 16:09:30 -07:00
Tom Finegan
fde45e52f2 Require Android NDK path in environment.
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.
2018-05-14 11:42:25 -07:00
Tom Finegan
16ca12ccd6 Improve Android CMake toolchains.
- Use the NDK directly instead of requiring standalone toolchains.
- Add x86 and x86_64 toolchains.
2018-05-08 09:19:20 -07:00
Tom Finegan
2c08fdb93c Add Android arm toolchains files. 2018-04-26 13:47:33 -07:00
Tom Finegan
0af6f725ba Add arm linux cmake toolchains. 2018-04-26 08:37:31 -07:00
Ondrej Stava
02272a65c7 Fixed cmake build 2018-04-18 16:26:49 -07:00
Tom Finegan
606fbb01bb Remove AOM cruft from arm ios toolchains.
Draco does not need the extra flags, and does not care
about AOM's internal configuration variables.
2018-02-09 10:05:08 -08:00
Tom Finegan
d20fb916c7 Add arm ios toolchains. 2018-02-09 10:01:27 -08:00
Tom Finegan
227c7be1af Additional CMake flag handling improvements.
- 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().
2017-12-23 09:27:47 -08:00
Tom Finegan
db609de80f Improve CMake C/CXX/AS flag handling.
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.
2017-12-22 16:37:43 -08:00
Frank Galligan
c61ddb67f3 Update Draco snapshot.
-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
2017-08-21 16:04:57 -07:00
Frank Galligan
da71b48359 Add more CMake helper scripts plus more CMake updates.
- Disallow in-tree CMake runs.
- Adds back CONTRIBUTING.md.

This fixes #130 and hopefully addresses #163.
2017-08-03 16:13:08 -07:00
Ondrej Stava
d0f313d292 Silence unknown link language warnings.
Fixes https://github.com/google/draco/issues/162
2017-08-02 15:17:59 -07:00
Ondrej Stava
90577b3f08 Added missing CMake file. 2017-08-02 12:24:29 -07:00
Ondrej Stava
81d73904ac Draco updated to 1.0.0 version
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
2017-07-28 14:25:10 -07:00
Frank Galligan
931a1de144 Fix Javascript and Windows builds.
1. Updating our javascript decoders reflecting latest changes.
2. Fix windows testing.
2017-02-17 10:02:19 -08:00