mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
add an option to not build binaries
This commit is contained in:
parent
4f91a717d1
commit
bec297526d
@ -23,6 +23,7 @@ option(USE_DEFLATE "Use libdeflate instead of libz" ON)
|
|||||||
option(USE_DOXYGEN "Build HTML cross reference with doxygen" OFF)
|
option(USE_DOXYGEN "Build HTML cross reference with doxygen" OFF)
|
||||||
option(USE_GPM "Enable libgpm console mouse support" OFF)
|
option(USE_GPM "Enable libgpm console mouse support" OFF)
|
||||||
option(USE_PANDOC "Build man pages and HTML reference with pandoc" ON)
|
option(USE_PANDOC "Build man pages and HTML reference with pandoc" ON)
|
||||||
|
option(BUILD_BINARIES "Build binaries" ON)
|
||||||
option(USE_POC "Build small, uninstalled proof-of-concept binaries" ON)
|
option(USE_POC "Build small, uninstalled proof-of-concept binaries" ON)
|
||||||
option(USE_QRCODEGEN "Enable libqrcodegen QR code support" OFF)
|
option(USE_QRCODEGEN "Enable libqrcodegen QR code support" OFF)
|
||||||
option(USE_STATIC "Build static libraries (in addition to shared)" ON)
|
option(USE_STATIC "Build static libraries (in addition to shared)" ON)
|
||||||
@ -46,6 +47,10 @@ elseif(${USE_MULTIMEDIA} STREQUAL "oiio")
|
|||||||
elseif(NOT ${USE_MULTIMEDIA} STREQUAL "none")
|
elseif(NOT ${USE_MULTIMEDIA} STREQUAL "none")
|
||||||
message(FATAL_ERROR "USE_MULTIMEDIA must be one of 'oiio', 'ffmpeg', 'none' (was '${USE_MULTIMEDIA}').")
|
message(FATAL_ERROR "USE_MULTIMEDIA must be one of 'oiio', 'ffmpeg', 'none' (was '${USE_MULTIMEDIA}').")
|
||||||
endif()
|
endif()
|
||||||
|
if (NOT BUILD_BINARIES AND USE_POC)
|
||||||
|
message(WARNING "Disabling USE_POC since BUILD_BINARIES=OFF")
|
||||||
|
set(USE_POC OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${USE_CXX})
|
if(${USE_CXX})
|
||||||
enable_language(CXX)
|
enable_language(CXX)
|
||||||
@ -554,6 +559,13 @@ if(${USE_CXX})
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# documentation source, processed by pandoc into XHTML and man pages. declare
|
||||||
|
# them here so that we can filter out man pages for binaries which aren't
|
||||||
|
# going to be installed.
|
||||||
|
file(GLOB MANSOURCE1 CONFIGURE_DEPENDS doc/man/man1/*.md)
|
||||||
|
file(GLOB MANSOURCE3 CONFIGURE_DEPENDS doc/man/man3/*.md)
|
||||||
|
|
||||||
|
if(BUILD_BINARIES)
|
||||||
############################################################################
|
############################################################################
|
||||||
# notcurses-demo
|
# notcurses-demo
|
||||||
file(GLOB DEMOSRCS CONFIGURE_DEPENDS src/demo/*.c)
|
file(GLOB DEMOSRCS CONFIGURE_DEPENDS src/demo/*.c)
|
||||||
@ -684,11 +696,6 @@ target_link_libraries(ncneofetch
|
|||||||
"${LIBRT}"
|
"${LIBRT}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# documentation source, processed by pandoc into XHTML and man pages. declare
|
|
||||||
# them here so that we can filter out man pages for binaries which aren't
|
|
||||||
# going to be installed.
|
|
||||||
file(GLOB MANSOURCE1 CONFIGURE_DEPENDS doc/man/man1/*.md)
|
|
||||||
file(GLOB MANSOURCE3 CONFIGURE_DEPENDS doc/man/man3/*.md)
|
|
||||||
|
|
||||||
# all further binaries require multimedia and C++ support
|
# all further binaries require multimedia and C++ support
|
||||||
if(${USE_CXX})
|
if(${USE_CXX})
|
||||||
@ -731,6 +738,10 @@ target_link_libraries(ncplayer
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
# No binaries built
|
||||||
|
set(MANSOURCE1 "")
|
||||||
|
endif() # BUILD_BINARIES
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# testing
|
# testing
|
||||||
@ -989,6 +1000,7 @@ file(GLOB MARKDOWN CONFIGURE_DEPENDS *.md)
|
|||||||
list(FILTER MARKDOWN EXCLUDE REGEX "INSTALL.md")
|
list(FILTER MARKDOWN EXCLUDE REGEX "INSTALL.md")
|
||||||
install(FILES ${MARKDOWN} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
install(FILES ${MARKDOWN} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
|
|
||||||
|
if(BUILD_BINARIES)
|
||||||
install(TARGETS notcurses-demo DESTINATION bin)
|
install(TARGETS notcurses-demo DESTINATION bin)
|
||||||
install(TARGETS notcurses-info DESTINATION bin)
|
install(TARGETS notcurses-info DESTINATION bin)
|
||||||
install(TARGETS ncneofetch DESTINATION bin)
|
install(TARGETS ncneofetch DESTINATION bin)
|
||||||
@ -1003,6 +1015,7 @@ install(TARGETS ncls DESTINATION bin)
|
|||||||
install(TARGETS ncplayer DESTINATION bin)
|
install(TARGETS ncplayer DESTINATION bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif() # BUILD_BINARIES
|
||||||
|
|
||||||
LIST(APPEND INSTLIBS notcurses-core notcurses)
|
LIST(APPEND INSTLIBS notcurses-core notcurses)
|
||||||
if(${USE_STATIC})
|
if(${USE_STATIC})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user