Skip to content

Commit

Permalink
draco: Improve installation and packaging support.
Browse files Browse the repository at this point in the history
- 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 google#764

* Add install() for draco-version.cmake.
  • Loading branch information
tomfinegan authored Dec 6, 2021
1 parent 342602a commit e2f3dfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ if("${draco_root}" STREQUAL "${draco_build}")
"And re-run CMake from the draco_build directory.")
endif()

include(CMakePackageConfigHelpers)
include(FindPythonInterp)
include("${draco_root}/cmake/draco_build_definitions.cmake")
include("${draco_root}/cmake/draco_cpu_detection.cmake")
Expand Down Expand Up @@ -347,6 +346,7 @@ list(APPEND draco_core_sources
"${draco_src_root}/core/draco_index_type_vector.h"
"${draco_src_root}/core/draco_types.cc"
"${draco_src_root}/core/draco_types.h"
"${draco_src_root}/core/draco_version.h"
"${draco_src_root}/core/encoder_buffer.cc"
"${draco_src_root}/core/encoder_buffer.h"
"${draco_src_root}/core/hash_utils.cc"
Expand Down

0 comments on commit e2f3dfd

Please sign in to comment.