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.
- 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.
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