mirror of
https://github.com/civetweb/civetweb
synced 2025-03-28 21:13:27 +00:00
feat: add pkg-config find libs
This commit is contained in:
parent
13f08c1557
commit
9ad4d99948
@ -599,6 +599,30 @@ configure_package_config_file(
|
||||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CIVETWEB_ENABLE_CXX
|
||||
)
|
||||
|
||||
configure_file(
|
||||
cmake/${PROJECT_NAME}.pc.in
|
||||
${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc
|
||||
@ONLY
|
||||
)
|
||||
|
||||
configure_file(
|
||||
cmake/${PROJECT_NAME}-cpp.pc.in
|
||||
${PROJECT_BINARY_DIR}/${PROJECT_NAME}-cpp.pc
|
||||
@ONLY
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}-cpp.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig"
|
||||
)
|
||||
|
||||
write_basic_package_version_file(${PROJECT_NAME}-config-version.cmake
|
||||
VERSION ${CIVETWEB_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
|
12
cmake/civetweb-cpp.pc.in
Normal file
12
cmake/civetweb-cpp.pc.in
Normal file
@ -0,0 +1,12 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
|
||||
Name: @PROJECT_NAME@-cpp
|
||||
Description: generic graph library
|
||||
Version: @PROJECT_VERSION@
|
||||
Requires:
|
||||
Libs: -L${libdir} -l@PROJECT_NAME@-cpp
|
||||
Cflags: -I${includedir}
|
||||
|
13
cmake/civetweb.pc.in
Normal file
13
cmake/civetweb.pc.in
Normal file
@ -0,0 +1,13 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: generic graph library
|
||||
Version: @PROJECT_VERSION@
|
||||
Requires:
|
||||
Libs: -L${libdir} -l@PROJECT_NAME@
|
||||
Cflags: -I${includedir}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user