silverqx / TinyORM

Modern C++ ORM library
https://www.tinyorm.org
MIT License
242 stars 25 forks source link

VCPKG misplaces debug target export file #25

Closed SchaichAlonso closed 1 year ago

SchaichAlonso commented 1 year ago

VCPKG uses cmake/vcpkg/ports/tinyorm/cmake/tiny_cmake_config_fixup.cmake to "move" the debug target file into another directory.

Assuming the ${TinyOrm_ns} is the subdirectory containing targets, the release file will also be in ${TinyOrm_ns} rather then ${PORT}, unless ${PORT} happens to be identical to ${TinyOrm_ns}, but even then only one of those names should be used for simplicity.

${PORT} will expand to tinyorm, while ${TinyOrm_ns} expands to TinyOrm. On filesystems that support uppercase characters to be differenciated from lowercase characters (or any other variations), this causes the debug target export file to reside in a different path then the release export file:

vcpkg/packages/tinyorm_x64-linux/share/cmake
vcpkg/packages/tinyorm_x64-linux/share/cmake/TinyOrm
vcpkg/packages/tinyorm_x64-linux/share/cmake/TinyOrm/TinyOrmTargets.cmake
vcpkg/packages/tinyorm_x64-linux/share/cmake/TinyOrm/Modules
vcpkg/packages/tinyorm_x64-linux/share/cmake/TinyOrm/Modules/TinyPackageConfigHelpers.cmake
vcpkg/packages/tinyorm_x64-linux/share/cmake/TinyOrm/TinyOrmConfig.cmake
vcpkg/packages/tinyorm_x64-linux/share/cmake/TinyOrm/TinyOrmConfigVersion.cmake
vcpkg/packages/tinyorm_x64-linux/share/cmake/TinyOrm/TinyOrmTargets-release.cmake
vcpkg/packages/tinyorm_x64-linux/share/cmake/tinyorm
vcpkg/packages/tinyorm_x64-linux/share/cmake/tinyorm/TinyOrmTargets-debug.cmake
silverqx commented 1 year ago

Nice catch

silverqx commented 1 year ago

Thx merged 👍