From edfb5d67191be6e4943415175da63e17270cbfec Mon Sep 17 00:00:00 2001 From: Dmitry Atamanov Date: Thu, 26 May 2022 06:57:29 +0500 Subject: [PATCH] Add USE_TFMAN_STATIC option --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 807ccb4af..e60f7b2fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ option(BUILD_FFI_LIBRARY "Build ffi library (containing all symbols which are st option(USE_POC "Build small, uninstalled proof-of-concept binaries" ON) option(USE_QRCODEGEN "Enable libqrcodegen QR code support" OFF) option(USE_STATIC "Build static libraries (in addition to shared)" ON) +option(USE_TFMAN_STATIC "Link tfman with notcurses statically" ON) set(USE_MULTIMEDIA "ffmpeg" CACHE STRING "Multimedia engine, one of 'ffmpeg', 'oiio', or 'none'") set_property(CACHE USE_MULTIMEDIA PROPERTY STRINGS ffmpeg oiio none) if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) @@ -746,6 +747,14 @@ target_include_directories(tfman "${libdeflate_INCLUDE_DIRS}" "${ZLIB_INCLUDE_DIRS}" ) +if(USE_TFMAN_STATIC AND USE_STATIC) +target_link_libraries(tfman + PRIVATE + notcurses-core-static + "${libdeflate}" + "${ZLIB_LIBRARIES}" +) +else() target_link_libraries(tfman PRIVATE notcurses-core @@ -753,6 +762,7 @@ target_link_libraries(tfman "${ZLIB_LIBRARIES}" ) endif() +endif() ############################################################################ # ncneofetch