Skip to content

Commit

Permalink
cmake: fix destination path (#34)
Browse files Browse the repository at this point in the history
`share/${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}` is shown
`share/groonga-normalizer-mysql`.
Thus, `README.md` and `doc/text/lgpl-2.0.txt`are installed in
`share/groonga-normalizer-mysql/`.
However, these files are installed `share/doc/groonga-normalizer-mysql/`
for RPM packages.

See:
https://github.com/groonga/groonga-normalizer-mysql/blob/main/packages/yum/groonga-normalizer-mysql.spec.in#L59C1-L59C42

I change destination path `share/groonga-normalizer-mysql` to
`share/doc/groonga-normalizer-mysql`.

---


https://github.com/groonga/groonga-normalizer-mysql/blob/main/CMakeLists.txt#L97
is defined `DESTINATION "${CMAKE_LIBDIR}/pkgconfig/"`.
However, `CMAKE_LIBDIR` is not definition. (Probably, `CMAKE_LIBDIR` is
null.)
Thus, `groonga-normalizer-mysql.pc` is installed to `pkgconfig/`. This
install path is not expected.

I change destination path `pkgconfig/` to `usr/lib64(or lib)/pkgconfig`.
  • Loading branch information
komainu8 authored Nov 2, 2023
1 parent 019f56e commit 200ed0b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ cmake_minimum_required(VERSION 3.16)
set(GROONGA_NORMALIZER_MYSQL_PROJECT_NAME "groonga-normalizer-mysql")
project("${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}")

if(NOT DEFINED GROONGA_NORMALIZER_MYSQL_DATA_DIR)
set(GROONGA_NORMALIZER_MYSQL_DATA_DIR
"share/${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}")
include(GNUInstallDirs)

if(NOT DEFINED GROONGA_NORMALIZER_MYSQL_DOC_DIR)
set(GROONGA_NORMALIZER_MYSQL_DOC_DIR
"${CMAKE_INSTALL_DOCDIR}/${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}")
endif()

if(DEFINED GROONGA_NORMALIZER_MYSQL_EMBED)
Expand Down Expand Up @@ -94,10 +96,10 @@ if(NOT GROONGA_NORMALIZER_MYSQL_EMBED)
@ONLY)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/groonga-normalizer-mysql.pc"
DESTINATION "${CMAKE_LIBDIR}/pkgconfig/")
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
endif()

install(FILES
"README.md"
"doc/text/lgpl-2.0.txt"
DESTINATION "${GROONGA_NORMALIZER_MYSQL_DATA_DIR}")
DESTINATION "${GROONGA_NORMALIZER_MYSQL_DOC_DIR}")

0 comments on commit 200ed0b

Please sign in to comment.