Skip to content

Commit

Permalink
Use CMAKE_INSTALL_* by including GNUInstallDirs
Browse files Browse the repository at this point in the history
  • Loading branch information
komainu8 committed Nov 2, 2023
1 parent ebf9a29 commit f2884f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 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}")

include(GNUInstallDirs)

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

if(DEFINED GROONGA_NORMALIZER_MYSQL_EMBED)
Expand Down Expand Up @@ -94,7 +96,7 @@ 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
Expand Down
1 change: 0 additions & 1 deletion packages/yum/groonga-normalizer-mysql.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ This package provides development files for groonga-normalizer-mysql.
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
-DCMAKE_LIBDIR=%{_libdir} \
%cmake_build

%install
Expand Down

0 comments on commit f2884f5

Please sign in to comment.