Date: Tue, 21 Sep 2021 03:49:39 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 97fdd544cdf2 - main - www/llhttp: Build and install static library Message-ID: <202109210349.18L3nds9018385@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=97fdd544cdf23c665a716e49254826a4b3d5dda1 commit 97fdd544cdf23c665a716e49254826a4b3d5dda1 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2021-09-21 03:09:40 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2021-09-21 03:43:56 +0000 www/llhttp: Build and install static library - Bump PORTREVISION for package change --- www/llhttp/Makefile | 1 + www/llhttp/files/CMakeLists.txt | 13 ++++++++++++- www/llhttp/pkg-plist | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/www/llhttp/Makefile b/www/llhttp/Makefile index 10a9a89581d1..8e6de18aa8ff 100644 --- a/www/llhttp/Makefile +++ b/www/llhttp/Makefile @@ -3,6 +3,7 @@ PORTNAME= llhttp PORTVERSION= 6.0.4 DISTVERSIONPREFIX= release/v +PORTREVISION= 1 CATEGORIES= www MAINTAINER= sunpoet@FreeBSD.org diff --git a/www/llhttp/files/CMakeLists.txt b/www/llhttp/files/CMakeLists.txt index 41d2000e993d..2a3bb13a0028 100644 --- a/www/llhttp/files/CMakeLists.txt +++ b/www/llhttp/files/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_C_STANDARD 99) # Options # # Generic option -option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) +#option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) # Source code set(LLHTTP_SOURCES @@ -23,9 +23,11 @@ set(LLHTTP_HEADERS ) add_library(llhttp) +add_library(llhttp_static STATIC) add_library(llhttp::llhttp ALIAS llhttp) target_sources(llhttp PRIVATE ${LLHTTP_SOURCES} ${LLHTTP_HEADERS}) +target_sources(llhttp_static PRIVATE ${LLHTTP_SOURCES} ${LLHTTP_HEADERS}) # On windows with Visual Studio, add a debug postfix so that release # and debug libraries can coexist. @@ -37,14 +39,23 @@ target_include_directories(llhttp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include> ) +target_include_directories(llhttp_static PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:include> +) + set_target_properties(llhttp PROPERTIES PUBLIC_HEADER ${LLHTTP_HEADERS}) +set_target_properties(llhttp_static PROPERTIES OUTPUT_NAME llhttp) install(TARGETS llhttp EXPORT llhttp ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/ ) +install(TARGETS llhttp_static + ARCHIVE DESTINATION lib +) # This is required to work with FetchContent install(EXPORT llhttp diff --git a/www/llhttp/pkg-plist b/www/llhttp/pkg-plist index 2566db4a9842..d255355fd6c5 100644 --- a/www/llhttp/pkg-plist +++ b/www/llhttp/pkg-plist @@ -1,4 +1,5 @@ include/llhttp.h lib/cmake/llhttp/llhttp-config-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/llhttp/llhttp-config.cmake +lib/libllhttp.a lib/libllhttp.so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109210349.18L3nds9018385>