File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,13 @@ file(RELATIVE_PATH
101101 "${CMAKE_INSTALL_PREFIX} "
102102)
103103
104- # TODO(jrivero): CMake 3.20 provides cmake_path(APPEND) which implements the
105- # same functionality as join_paths(). Remove JoinPaths in the next major version
106- # if all the supported platforms are in 3.20 version.
107- include (JoinPaths)
108- join_paths(GZ_PC_LIBDIR "\$ {prefix}" "${CMAKE_INSTALL_LIBDIR} " )
109- join_paths(GZ_PC_INCLUDEDIR "\$ {prefix}" "${CMAKE_INSTALL_INCLUDEDIR} " "${GZ_INCLUDE_INSTALL_DIR_POSTFIX} " )
104+ # Use cmake_path(APPEND) to construct path variables used in pkg-config file.
105+ # Since the first argument to this function must be a cmake variable (not a
106+ # string constant, initialize the variable to the first path component.
107+ set (GZ_PC_LIBDIR "\$ {prefix}" )
108+ cmake_path(APPEND GZ_PC_LIBDIR "${CMAKE_INSTALL_LIBDIR} " )
109+ set (GZ_PC_INCLUDEDIR "\$ {prefix}" )
110+ cmake_path(APPEND GZ_PC_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR} " "${GZ_INCLUDE_INSTALL_DIR_POSTFIX} " )
110111
111112configure_file (${gz_pkgconfig_input} ${gz_pkgconfig_output} @ONLY)
112113
You can’t perform that action at this time.
0 commit comments