offa / scope-guard

Implementation of Scoped Guards and Unique Resource as proposed in P0052.
MIT License
46 stars 6 forks source link

[cmake] fix find package name and path mixed typography #193

Closed FrancoisCarouge closed 1 year ago

FrancoisCarouge commented 1 year ago

Mixed camel-case and hyphenated-case prevent the CMake find package command to natively find the package, with error:

  By not providing "FindScopeGuard.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "ScopeGuard", but CMake did not find one.

  Could not find a package configuration file provided by "ScopeGuard" with
  any of the following names:

    ScopeGuardConfig.cmake
    scopeguard-config.cmake

  Add the installation prefix of "ScopeGuard" to CMAKE_PREFIX_PATH or set
  "ScopeGuard_DIR" to a directory containing one of the above files.  If
  "ScopeGuard" provides a separate development package or SDK, be sure it has
  been installed.

The fix is to use one or the other CMake suppoted naming standard (not mixing). Now, the error is resolved and find_package(ScopeGuard) works.

offa commented 1 year ago

I have created a new release including that fix.