diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a537c4..3af7669 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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}")