Missing version.hpp during installation
RosenGeorgiev opened this issue · 7 comments
Description
So this happens during make install:
CMake Error at _deps/mailio-build/cmake_install.cmake:50 (file):
file INSTALL cannot find "/drone/src/build_package/version.hpp": No such
file or directory.
Call Stack (most recent call first):
cmake_install.cmake:72 (include)
make: *** [Makefile:120: install] Error 1
I guess it's because of the usage of ${CMAKE_BINARY_DIR}
here:
install(FILES ${CMAKE_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
Using ${CMAKE_CURRENT_BINARY_DIR}
instead seems to fix it.
NOTE
I'm adding mailio to my project via:
FetchContent_Declare(
mailio
URL https://github.com/karastojko/mailio/archive/version_0-22-0.tar.gz
GIT_REPOSITORY git@gitea.lan:external/mailio.git
GIT_TAG 0.22.0
)
FetchContent_MakeAvailable(mailio)
I guess that's what causes the problem with ${CMAKE_BINARY_DIR}
.
Does it also happen when you clone it from the master? I do not have the problem. Which operating system is being used?
It happens on master too. I reproduce it on arch, ubuntu 22.04 and fedora 38. I'll try to assemble a small example that reproduces it when I can.
It happens to me too, on macOS 13.4, llvm clang 16.0.5.
It works when I delete all the lines start with "install". I guess something changed with vcpkg.
I'll really try to assemble an example this weekend 😁
So, this small example reproduces the problem for me. I Hope it helps.
The slightly changed script
project(external)
include(FetchContent)
FetchContent_Declare(
mailio
GIT_REPOSITORY https://github.com/karastojko/mailio.git
GIT_TAG 0.22.0
)
FetchContent_MakeAvailable(mailio)
works for me. I guess there is a way to make it work with the zip archive, but does this solve your problem?
I do not see it as the mailio problem, thus closing the issue.