Skip to content

Commit 0e96e51

Browse files
hosietlotem
authored andcommitted
fix(CMakeLists.txt): ensure paths in pkgconfig file are absolute
This fixes the regression introduced in the last commit. The ${CMAKE_INSTALL_*DIR} variables are not absolute and we must prepend them with ${prefix} or ${exec_prefix} to make it fully working. There are also ${CMAKE_INSTALL_FILL_*DIR} variables but we are not using them for now since librime is still using custom ${LIB_INSTALL_DIR} and ${BIN_INSTALL_DIR}.
1 parent 3cf8eaf commit 0e96e51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ add_custom_target(uninstall
181181
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|DragonFly")
182182
set(prefix "${CMAKE_INSTALL_PREFIX}")
183183
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
184-
set(bindir "${BIN_INSTALL_DIR}")
185-
set(libdir "${LIB_INSTALL_DIR}")
184+
set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}")
185+
set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}")
186186
set(pkgdatadir "${prefix}${rime_data_dir}")
187-
set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
187+
set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
188188
configure_file(
189189
${PROJECT_SOURCE_DIR}/rime.pc.in
190190
${PROJECT_BINARY_DIR}/rime.pc

0 commit comments

Comments
 (0)