Skip to content

Commit

Permalink
cmake: fix incorrect relative path concatenation (#733)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nh2 committed Nov 5, 2021
1 parent 17e7679 commit 68964b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 68964b8

Please sign in to comment.