Skip to content

Commit

Permalink
fix(CMakeLists.txt): ensure paths in pkgconfig file are absolute
Browse files Browse the repository at this point in the history
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}.
  • Loading branch information
hosiet authored and lotem committed Dec 17, 2019
1 parent 3cf8eaf commit 0e96e51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ add_custom_target(uninstall
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|DragonFly")
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(bindir "${BIN_INSTALL_DIR}")
set(libdir "${LIB_INSTALL_DIR}")
set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}")
set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}")
set(pkgdatadir "${prefix}${rime_data_dir}")
set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
configure_file(
${PROJECT_SOURCE_DIR}/rime.pc.in
${PROJECT_BINARY_DIR}/rime.pc
Expand Down

0 comments on commit 0e96e51

Please sign in to comment.