81a8ae
Use PCDIR CMake option, if configured
81a8ae
81a8ae
Upstream install the server pkgconfig file into arch-independent directory
81a8ae
Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340
81a8ae
81a8ae
--- mariadb-10.3.12/support-files/CMakeLists.txt	2019-03-20 15:25:53.423283135 +0100
81a8ae
+++ mariadb-10.3.12/support-files/CMakeLists.txt_patched	2019-03-20 15:38:56.372819958 +0100
81a8ae
@@ -82,7 +82,12 @@ IF(UNIX)
81a8ae
 
81a8ae
   CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY)
81a8ae
   CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY)
81a8ae
+IF(INSTALL_PCDIR)
81a8ae
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_PCDIR} COMPONENT Development)
81a8ae
+ELSE()
81a8ae
   INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development)
81a8ae
+ENDIF()
81a8ae
+
81a8ae
 
81a8ae
   INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
81a8ae