2021-06-24 10:12:55 +08:00
|
|
|
|
2022-02-21 16:30:34 +08:00
|
|
|
option(MINIMAL_SIZE_OPTIMIZED "For IOT/Embedded size optimize" OFF)
|
2021-06-24 10:12:55 +08:00
|
|
|
option(BUILD_EXAMPLES "Build examples" OFF)
|
2022-02-21 16:30:34 +08:00
|
|
|
option(BUILD_CDROID_TESTS "Build unit tests" ON)
|
2021-06-24 10:12:55 +08:00
|
|
|
|
|
|
|
option(ENABLE_GIF "enable gif encode and decoder" OFF)
|
|
|
|
option(ENABLE_CAIROSVG "enable svg decoder" OFF)
|
2022-11-26 23:21:07 +08:00
|
|
|
option(ENABLE_MBEDTLS "enable mbedtls" ON)
|
2021-06-24 10:12:55 +08:00
|
|
|
option(ENABLE_UPNP "enable upnp/dlna" OFF)
|
|
|
|
option(ENABLE_GESTURE "enable gestrure" OFF)
|
2022-02-20 19:54:12 +08:00
|
|
|
option(ENABLE_PLPLOT "Enable PLPLot" OFF)
|
2022-01-11 14:10:07 +08:00
|
|
|
option(ENABLE_DTV "DTV modules support" OFF)
|
2021-06-24 10:12:55 +08:00
|
|
|
option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" ON)
|
2022-02-20 19:54:12 +08:00
|
|
|
option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." ON)
|
2021-06-24 10:12:55 +08:00
|
|
|
|
|
|
|
option(ENABLE_PINYIN2HZ "Chinese Pinyin to HZ support" OFF)
|
|
|
|
|
2022-11-26 23:21:07 +08:00
|
|
|
set(CMAKE_USE_OPENSSL ON)
|
|
|
|
set(ENABLE_IPV6 OFF)#for CURL
|
2021-06-24 10:12:55 +08:00
|
|
|
|
|
|
|
if(ENABLE_GIF)
|
2022-11-29 17:32:27 +08:00
|
|
|
list(APPEND OPTIONAL_LIBS gif)
|
2021-06-24 10:12:55 +08:00
|
|
|
endif()
|
|
|
|
|
2022-11-29 17:32:27 +08:00
|
|
|
find_package(PNG REQUIRED)
|
|
|
|
find_package(JPEG REQUIRED)
|
2021-06-24 10:12:55 +08:00
|
|
|
|
|
|
|
if(ENABLE_TURBOJPEG)
|
2022-11-29 17:32:27 +08:00
|
|
|
find_package(TurboJPEG REQUIRED)
|
|
|
|
list(APPEND CDROID_DEPLIBS ${TURBOJPEG_LIBRARIES})
|
|
|
|
endif(ENABLE_TURBOJPEG)
|
|
|
|
|
2022-11-29 19:02:11 +08:00
|
|
|
find_package(ZLIB REQUIRED)
|
2022-11-29 17:32:27 +08:00
|
|
|
find_package(JSONCPP REQUIRED)
|
|
|
|
find_package(ZIP REQUIRED)
|
|
|
|
find_package(Freetype2 REQUIRED)
|
|
|
|
find_package(EXPAT REQUIRED)
|
|
|
|
find_package(Pixman REQUIRED)
|
|
|
|
find_package(Cairo REQUIRED)
|
|
|
|
find_package(OpenSSL)
|
2022-11-29 19:02:11 +08:00
|
|
|
find_package(Fontconfig REQUIRED)
|
2022-11-30 17:11:10 +08:00
|
|
|
find_package(Brotli REQUIRED)
|
|
|
|
find_package(BZip2 REQUIRED)
|
|
|
|
find_package(UniBreak REQUIRED)
|
2021-06-24 10:12:55 +08:00
|
|
|
|
|
|
|
if(ENABLE_FRIBIDI)
|
2022-11-29 17:32:27 +08:00
|
|
|
find_package(Fribidi REQUIRED)
|
|
|
|
list(APPEND CDROID_DEPLIBS ${FRIBIDI_LIBRARIES})
|
|
|
|
endif(ENABLE_FRIBIDI)
|
|
|
|
|
|
|
|
list(APPEND CDROID_DEPLIBS
|
2022-11-30 17:11:10 +08:00
|
|
|
${ZLIB_LIBRARIES}
|
|
|
|
${BROTLIDEC_LIBRARIES}
|
|
|
|
${BZIP2_LIBRARIES}
|
|
|
|
${PNG_LIBRARIES}
|
2022-11-29 17:32:27 +08:00
|
|
|
${JPEG_LIBRARIES}
|
|
|
|
${ZIP_LIBRARIES}
|
2022-11-30 17:11:10 +08:00
|
|
|
${UNIBREAK_LIBRARIES}
|
2022-11-29 17:32:27 +08:00
|
|
|
${EXPAT_LIBRARIES}
|
|
|
|
${PIXMAN_LIBRARIES}
|
2022-11-30 20:47:47 +08:00
|
|
|
#-Wl,--start-group
|
2022-11-30 17:11:10 +08:00
|
|
|
${FONTCONFIG_LIBRARIES}
|
|
|
|
${FREETYPE2_LIBRARIES}
|
|
|
|
${CAIRO_LIBRARIES}
|
2022-11-30 20:47:47 +08:00
|
|
|
# -Wl,--end-group
|
2022-11-29 19:02:11 +08:00
|
|
|
${JSONCPP_LIBRARIES}
|
2022-11-29 17:32:27 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND CDROID_DEPINCLUDES
|
|
|
|
${PNG_INCLUDE_DIRS}
|
|
|
|
${JPEG_INCLUDE_DIRSS}
|
|
|
|
${ZIP_INCLUDE_DIRS}
|
2022-11-30 17:11:10 +08:00
|
|
|
${BROTLI_INCLUDE_DIRS}
|
2022-11-29 17:32:27 +08:00
|
|
|
${EXPAT_INCLUDE_DIRS}
|
|
|
|
${JSONCPP_INCLUDE_DIRS}
|
|
|
|
${CAIRO_INCLUDE_DIRS}
|
|
|
|
${CAIRO_INCLUDE_DIRS}/cairo
|
|
|
|
${PIXMAN_INCLUDE_DIRS}
|
|
|
|
${FRIBIDI_INCLUDE_DIRS}
|
|
|
|
${TURBOJPEG_INCLUDE_DIRS}
|
|
|
|
)
|
2022-11-30 17:11:10 +08:00
|
|
|
#message("BROTLI_LIBRARIES
|
2022-11-29 17:32:27 +08:00
|
|
|
if(OPENSSL_FOUND)
|
|
|
|
list(APPEND CDROID_DEPINCLUDES ${OPENSSL_INCLUDE_DIRS})
|
|
|
|
list(APPEND CDROID_DEPLIBS ${OPENSSL_LIBRARIES})
|
|
|
|
endif(OPENSSL_FOUND)
|
2021-12-28 16:30:28 +08:00
|
|
|
|
2021-06-24 10:12:55 +08:00
|
|
|
if(ENABLE_PINYIN2HZ)
|
|
|
|
list(APPEND OPTIONAL_LIBS pinyin)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(EXISTS "${CMAKE_SOURCE_DIR}/src/gui/gui_features.h.cmake")
|
2022-11-29 17:32:27 +08:00
|
|
|
configure_file(src/gui/gui_features.h.cmake ${CMAKE_BINARY_DIR}/include/gui/gui_features.h)
|
2021-06-24 10:12:55 +08:00
|
|
|
endif()
|
2022-03-07 12:08:16 +08:00
|
|
|
set(SKIP_INSTALL_EXPORT TRUE)
|