diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index eaf8271..bdf0738 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ find_library(libubox NAMES ubox) find_library(libubus NAMES ubus) find_library(libblobmsg_json NAMES blobmsg_json) find_package(ZLIB) -find_library(libmd NAMES md) +find_library(libmd NAMES libmd.a md) if(LINUX) find_library(libnl_tiny NAMES nl-tiny) @@ -73,6 +73,7 @@ option(LOG_SUPPORT "Log plugin support" ON) option(SOCKET_SUPPORT "Socket plugin support" ON) option(ZLIB_SUPPORT "Zlib plugin support" ${DEFAULT_ZLIB_SUPPORT}) option(DIGEST_SUPPORT "Digest plugin support" ${DEFAULT_DIGEST_SUPPORT}) +option(DIGEST_SUPPORT_EXTENDED "Enable additional hash algorithms" ${DEFAULT_DIGEST_SUPPORT}) set(LIB_SEARCH_PATH "${CMAKE_INSTALL_PREFIX}/lib/ucode/*.so:${CMAKE_INSTALL_PREFIX}/share/ucode/*.uc:./*.so:./*.uc" CACHE STRING "Default library search path") string(REPLACE ":" "\", \"" LIB_SEARCH_DEFINE "${LIB_SEARCH_PATH}") @@ -297,9 +298,14 @@ if(ZLIB_SUPPORT) endif() if(DIGEST_SUPPORT) + pkg_check_modules(LIBMD REQUIRED libmd) + include_directories(${LIBMD_INCLUDE_DIRS}) set(LIBRARIES ${LIBRARIES} digest_lib) add_library(digest_lib MODULE lib/digest.c) set_target_properties(digest_lib PROPERTIES OUTPUT_NAME digest PREFIX "") + if(DIGEST_SUPPORT_EXTENDED) + target_compile_definitions(digest_lib PUBLIC HAVE_DIGEST_EXTENDED) + endif() target_link_options(digest_lib PRIVATE ${UCODE_MODULE_LINK_OPTIONS}) target_link_libraries(digest_lib ${libmd}) endif() |