mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
cmake: better use of feature_summary
This commit is contained in:
parent
0060a60756
commit
a3f5ba2e5c
@ -74,14 +74,17 @@ set_package_properties(Threads PROPERTIES TYPE REQUIRED)
|
|||||||
# some distros (<cough>motherfucking alpine</cough> subsume terminfo directly
|
# some distros (<cough>motherfucking alpine</cough> subsume terminfo directly
|
||||||
# into ncurses. accept either, and may god have mercy on our souls.
|
# into ncurses. accept either, and may god have mercy on our souls.
|
||||||
pkg_search_module(TERMINFO REQUIRED tinfo>=6.1 ncursesw>=6.1)
|
pkg_search_module(TERMINFO REQUIRED tinfo>=6.1 ncursesw>=6.1)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND terminfo)
|
||||||
|
set_package_properties(terminfo PROPERTIES TYPE REQUIRED)
|
||||||
if(${USE_FFMPEG})
|
if(${USE_FFMPEG})
|
||||||
pkg_check_modules(AVCODEC libavcodec>=57.0)
|
pkg_check_modules(AVCODEC REQUIRED libavcodec>=57.0)
|
||||||
pkg_check_modules(AVFORMAT REQUIRED libavformat>=57.0)
|
pkg_check_modules(AVFORMAT REQUIRED libavformat>=57.0)
|
||||||
pkg_check_modules(AVUTIL REQUIRED libavutil>=56.0)
|
pkg_check_modules(AVUTIL REQUIRED libavutil>=56.0)
|
||||||
pkg_check_modules(SWSCALE REQUIRED libswscale>=5.0)
|
pkg_check_modules(SWSCALE REQUIRED libswscale>=5.0)
|
||||||
set_package_properties(AVCODEC PROPERTIES TYPE REQUIRED)
|
set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND FFMpeg)
|
||||||
elseif(${USE_OIIO})
|
elseif(${USE_OIIO})
|
||||||
pkg_check_modules(OIIO REQUIRED OpenImageIO>=2.1)
|
pkg_check_modules(OIIO REQUIRED OpenImageIO>=2.1)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND OpenImageIO)
|
||||||
endif()
|
endif()
|
||||||
find_library(MATH_LIBRARIES m)
|
find_library(MATH_LIBRARIES m)
|
||||||
if(${USE_DOCTEST})
|
if(${USE_DOCTEST})
|
||||||
@ -96,12 +99,15 @@ check_include_file("uniwbrk.h" HAVE_UNISTRING_H)
|
|||||||
if(NOT "${HAVE_UNISTRING_H}")
|
if(NOT "${HAVE_UNISTRING_H}")
|
||||||
message(FATAL_ERROR "Couldn't find uniwbrk.h from GNU libunistring")
|
message(FATAL_ERROR "Couldn't find uniwbrk.h from GNU libunistring")
|
||||||
endif()
|
endif()
|
||||||
|
set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND libunistring)
|
||||||
|
set_package_properties(libunistring PROPERTIES TYPE REQUIRED)
|
||||||
unset(HAVE_QRCODEGEN_H CACHE)
|
unset(HAVE_QRCODEGEN_H CACHE)
|
||||||
if("${USE_QRCODEGEN}")
|
if("${USE_QRCODEGEN}")
|
||||||
check_include_file("qrcodegen/qrcodegen.h" HAVE_QRCODEGEN_H)
|
check_include_file("qrcodegen/qrcodegen.h" HAVE_QRCODEGEN_H)
|
||||||
if(NOT "${HAVE_QRCODEGEN_H}")
|
if(NOT "${HAVE_QRCODEGEN_H}")
|
||||||
message(FATAL_ERROR "USE_QRCODEGEN is active, but couldn't find qrcodegen.h")
|
message(FATAL_ERROR "USE_QRCODEGEN is active, but couldn't find qrcodegen.h")
|
||||||
endif()
|
endif()
|
||||||
|
set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND qrcodegen)
|
||||||
endif()
|
endif()
|
||||||
find_library(LIBRT rt)
|
find_library(LIBRT rt)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user