draco/cmake/draco-config.cmake.template
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

8 lines
365 B
Plaintext

@PACKAGE_INIT@
set_and_check(DRACO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
set_and_check(DRACO_LIBRARY_DIR "@CMAKE_INSTALL_FULL_LIBDIR@")
set(DRACO_NAMES draco.dll libdraco.dylib libdraco.so draco.lib libdraco.a)
find_library(_DRACO_LIBRARY PATHS ${DRACO_LIBRARY_DIR} NAMES ${DRACO_NAMES})
set_and_check(DRACO_LIBRARY ${_DRACO_LIBRARY})
set(DRACO_FOUND YES)