From 1725332d471da74abdbf9073d8248b67fbe74e5c Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 19 Jun 2017 12:29:48 +0800 Subject: [PATCH] pkgconfig https://github.com/warmcat/libwebsockets/issues/933 --- CMakeLists.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a79fdf9..b596c20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1558,6 +1558,26 @@ Cflags: -I\${includedir}" install(FILES "${PROJECT_BINARY_DIR}/libwebsockets.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig) + +file(WRITE "${PROJECT_BINARY_DIR}/libwebsockets_static.pc" +"prefix=\"${CMAKE_INSTALL_PREFIX}\" +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib${LIB_SUFFIX} +includedir=\${prefix}/include + +Name: libwebsockets_static +Description: Websockets server and client static library +Version: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} + +Libs: -L\${libdir} -lwebsockets_static +Libs.private: +Cflags: -I\${includedir}" +) + + install(FILES "${PROJECT_BINARY_DIR}/libwebsockets_static.pc" + DESTINATION lib${LIB_SUFFIX}/pkgconfig) + + endif(UNIX) # -- 2.7.4