Skip to content

Commit

Permalink
generate .pc files on CMake too
Browse files Browse the repository at this point in the history
  • Loading branch information
jan@mysql.com committed Nov 5, 2009
1 parent 15bc348 commit 6d108a4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
13 changes: 10 additions & 3 deletions CMakeLists.txt
Expand Up @@ -236,7 +236,8 @@ IF(NOT BUILD_NUMBER)
ENDIF(NOT BUILD_NUMBER)

SET(PACKAGE_VERSION_ID "(${CPACK_PACKAGE_VERSION_MAJOR} << 16 | ${CPACK_PACKAGE_VERSION_MINOR} << 8 | ${CPACK_PACKAGE_VERSION_PATCH})")
SET(PACKAGE_STRING "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(PACKAGE_VERSION_STRING "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(PACKAGE_STRING "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION}")
ADD_DEFINITIONS(-DPACKAGE_VERSION_ID=${PACKAGE_VERSION_ID} -DPACKAGE_STRING="${PACKAGE_STRING}" -DPACKAGE="${CMAKE_PROJECT_NAME}")
## set the default-paths for the .lua files and its modules
IF(WIN32)
Expand Down Expand Up @@ -306,5 +307,11 @@ IF(WIN32)
)
ENDIF(WIN32)

CONFIGURE_FILE(mysql-chassis.pc.in mysql-chassis.pc)
CONFIGURE_FILE(mysql-proxy.pc.in mysql-proxy.pc)
CONFIGURE_FILE(mysql-chassis.pc.cmake mysql-chassis.pc @ONLY)
CONFIGURE_FILE(mysql-proxy.pc.cmake mysql-proxy.pc @ONLY)
INSTALL(FILES mysql-chassis.pc
DESTINATION lib/pkgconfig/
)
INSTALL(FILES mysql-proxy.pc
DESTINATION lib/pkgconfig/
)
2 changes: 2 additions & 0 deletions Makefile.am
Expand Up @@ -10,6 +10,8 @@ EXTRA_DIST = \
winbuild.bat \
doxygen-scripts \
CMakeLists.txt \
mysql-chassis.pc.cmake \
mysql-proxy.pc.cmake \
deps

ACLOCAL_AMFLAGS = -I m4
Expand Down
12 changes: 12 additions & 0 deletions mysql-chassis.pc.cmake
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_PREFIX@/lib
includedir=@CMAKE_INSTALL_PREFIX@/include

Name: mysql-chassis
Version: @PACKAGE_VERSION_STRING@
Description: the Chassis of the MySQL Proxy
URL: http://forge.mysql.com/wiki/MySQL_Proxy
Requires: glib-2.0 >= 2.16
Libs: -L${libdir} -lmysql-chassis
Cflags: -I${includedir}
13 changes: 13 additions & 0 deletions mysql-proxy.pc.cmake
@@ -0,0 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_PREFIX@/lib
pkglibdir=${libdir}/mysql-proxy
lualibdir=${pkglibdir}/lua
plugindir=${pkglibdir}/plugins

Name: MySQL Proxy
Version: @PACKAGE_VERSION_STRING@
Description: MySQL Proxy
URL: http://forge.mysql.com/wiki/MySQL_Proxy
Requires: glib-2.0 >= 2.16, mysql-chassis >= @PACKAGE_VERSION_STRING@
Libs: -L${libdir} -lmysql-chassis-proxy

0 comments on commit 6d108a4

Please sign in to comment.