cmake: create and install pkg-config files (#2224)

* cmake: create and install pkg-config files

Automatically create and install *.pc files for selected components.

PocoFoundation.pc
PocoNet.pc
PocoUtil.pc
etc.
This commit is contained in:
Yegor Yefremov
2018-06-12 20:42:19 +02:00
committed by Joerg-Christian Boehme
parent 0be0ce0be4
commit 6b9054dfa2
37 changed files with 255 additions and 0 deletions

View File

@@ -31,3 +31,7 @@ POCO_GENERATE_PACKAGE(SQLMySQL)
if (POCO_ENABLE_TESTS)
add_subdirectory(testsuite)
endif ()
configure_file(PocoSQLMySQL.pc.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/PocoSQLMySQL.pc @ONLY)
list(APPEND POCO_PKG_CONFIG_FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/PocoSQLMySQL.pc)
set(POCO_PKG_CONFIG_FILES ${POCO_PKG_CONFIG_FILES} PARENT_SCOPE)

View File

@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
libdir=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@
includedir=@CMAKE_INSTALL_PREFIX@/include/Poco
Name: PocoSQLMySQL
Description: C++ Portable Components (POCO) SQL MySQL library
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lPocoSQLMySQL
Cflags: -I${includedir}