Closed bvstrien closed 3 months ago
Could you create a PR instead of adding a patch to this issue?
@LecrisUT What do you think?
I haven't seen any good windows CMake scripts that I can reference and I am not familiar enough with the ecosystem. Maybe there it does make sense to have cpack and stuff.
Anyway regarding CMAKE_INSTALL_RUNTIMEDIR
-> CMAKE_INSTALL_BINDIR
. Indeed the former does not exist (must have misread RUNSTATEDIR
). The latter expands to bin
, is that an appropriate design on windows or should it be lib
. If you have any reference @bvstrien it would be greatly appreciated
I don't have a direct reference. But I consume this library via vcpkg, and microsoft provides clear guidance there: Installation directory layout conventions
In short, the bin dir should contain the dll files, as they should be next to the exe files, and the lib dir should contain static libraries and import libraries. That now seems to be the case again, and vcpkg installs it properly after the fix.
Thanks, didn't know it followed GNUInstallDirs
. About vcpkg
, does it need to be uploaded or packaged like in conan
or does it take it dynamically?
I'm not quite sure what you're asking, but it basically automates downloading, building and deploying the packages using the library-provided build tools. See their "portfile" here, which calls vcpkg_cmake_install()
, which presumably just ends up calling cmake --install
.
Thanks, you've answered my question :D. Yeah you need to upload some metadata similar to homebrew and other packages. Cheers for the assist @bvstrien
Since version 2.3.0 (commit https://github.com/pboettch/json-schema-validator/commit/0d60d48a586965b56d1f5c89a1e7a5cedbbdb8f2) the install target on windows is broken, as predicted by the following comment:
https://github.com/pboettch/json-schema-validator/blob/349cba9f7e3cb423bbc1811bdd9f6770f520b468/src/CMakeLists.txt#L58
The problem seems to be the use of the non-existent
${CMAKE_INSTALL_RUNTIMEDIR}
, replacing it with${CMAKE_INSTALL_BINDIR}
fixed it for me. The documentation for install(TARGETS) also suggestsRUNTIME
should be set to${CMAKE_INSTALL_BINDIR}
.I've attached a patch, applying this fix. fix_cmake.patch