Skip to content

Commit

Permalink
cmake: Fix incorrect relative-path concatenation.
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.

Signed-off-by: Niklas Hambüchen <mail@nh2.me>
  • Loading branch information
nh2 committed Nov 4, 2021
1 parent a8d871c commit 57c636c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,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

0 comments on commit 57c636c

Please sign in to comment.