cmake: fix incorrect relative path concatenation (#733)

When a `-DCMAKE_INSTALL_PREFIX` is given, this could result in paths like:

    /path/to/prefix//path/to/prefix/lib/cmake/glog/glog-modules.cmake

which was incorrect.

If a relative `DESTINATION` is given, it's assumed to be relative to the install prefix.
This commit is contained in:
Niklas Hambüchen 2021-11-05 22:19:36 +01:00 committed by GitHub
parent 17e7679fd9
commit 68964b8db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@ Guillaume Dumont <dumont.guillaume@gmail.com>
Marco Wang <m.aesophor@gmail.com>
Michael Tanner <michael@tannertaxpro.com>
MiniLight <MiniLightAR@Gmail.com>
Niklas Hambuechen <mail@nh2.me>
romange <romange@users.noreply.github.com>
Roman Perepelitsa <roman.perepelitsa@gmail.com>
Sergiu Deitsch <sergiu.deitsch@gmail.com>

View File

@ -1027,7 +1027,7 @@ configure_file (\"${CMAKE_CURRENT_SOURCE_DIR}/glog-modules.cmake.in\"
file (INSTALL
\"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/glog-modules.cmake\"
DESTINATION
\"\${CMAKE_INSTALL_PREFIX}/${_glog_CMake_INSTALLDIR}\")
\"${_glog_CMake_INSTALLDIR}\")
"
COMPONENT Development
)

View File

@ -39,6 +39,7 @@ Marco Wang <m.aesophor@gmail.com>
Michael Darr <mdarr@matician.com>
Michael Tanner <michael@tannertaxpro.com>
MiniLight <MiniLightAR@Gmail.com>
Niklas Hambuechen <mail@nh2.me>
Peter Collingbourne <pcc@google.com>
Rodrigo Queiro <rodrigoq@google.com>
romange <romange@users.noreply.github.com>