diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-09-21 03:09:40 +0000 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-09-21 03:43:56 +0000 |
commit | 97fdd544cdf23c665a716e49254826a4b3d5dda1 (patch) | |
tree | b865133c8b74a021e75ad79be9eb8bc7fc1a3fdb | |
parent | 69b324985ac6513b702b755321b047547460813e (diff) | |
download | ports-97fdd544cdf23c665a716e49254826a4b3d5dda1.tar.gz ports-97fdd544cdf23c665a716e49254826a4b3d5dda1.zip |
www/llhttp: Build and install static library
- Bump PORTREVISION for package change
-rw-r--r-- | www/llhttp/Makefile | 1 | ||||
-rw-r--r-- | www/llhttp/files/CMakeLists.txt | 13 | ||||
-rw-r--r-- | www/llhttp/pkg-plist | 1 |
3 files changed, 14 insertions, 1 deletions
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 |