libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 8189f9cd78f8481b2c9d37ca29efa8619757fd03
parent 25c572d617d23812eed57eaa03deccd372908197
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 14 Apr 2022 17:05:34 +0200

Also build and install libansilove as a static library.

Diffstat:
MCMakeLists.txt | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -38,7 +38,12 @@ if(NOT HAVE_REALLOCARRAY) endif() add_definitions(-D_GNU_SOURCE -Wall -Wextra -pedantic) -add_library(ansilove SHARED ${SRC} ${LOADERS}) + +add_library(objlib OBJECT ${SRC} ${LOADERS}) +set_property(TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE ON) + +add_library(ansilove SHARED $<TARGET_OBJECTS:objlib>) +add_library(ansilove-static STATIC $<TARGET_OBJECTS:objlib>) target_link_libraries(ansilove ${GD_LIBRARIES} m) @@ -47,6 +52,7 @@ set_target_properties(ansilove PROPERTIES C_VISIBILITY_PRESET hidden) install(TARGETS ansilove DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(TARGETS ansilove-static DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES include/ansilove.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(FILES man/libansilove.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3/) install(FILES man/ansilove_clean.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3/)