2023-10-21 23:16:20 +02:00
|
|
|
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
|
|
|
|
|
2023-10-25 19:37:13 +02:00
|
|
|
include(FetchContent)
|
|
|
|
|
2023-10-21 23:16:20 +02:00
|
|
|
add_subdirectory(./solanaceae_util)
|
|
|
|
|
|
|
|
add_subdirectory(./entt)
|
|
|
|
|
2023-10-25 19:37:13 +02:00
|
|
|
if (NOT TARGET solanaceae_contact)
|
|
|
|
FetchContent_Declare(solanaceae_contact
|
|
|
|
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_contact.git
|
|
|
|
GIT_TAG master
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(solanaceae_contact)
|
|
|
|
endif()
|
2023-10-21 23:16:20 +02:00
|
|
|
|
2023-10-25 19:37:13 +02:00
|
|
|
if (NOT TARGET solanaceae_message3)
|
|
|
|
FetchContent_Declare(solanaceae_message3
|
|
|
|
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_message3.git
|
|
|
|
GIT_TAG master
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(solanaceae_message3)
|
|
|
|
endif()
|
2023-10-25 17:51:48 +02:00
|
|
|
|
2023-10-21 23:16:20 +02:00
|
|
|
# TODO: move to clamav.cmake
|
|
|
|
find_package(PkgConfig QUIET)
|
|
|
|
if (PKG_CONFIG_FOUND)
|
2023-10-24 01:22:09 +02:00
|
|
|
pkg_check_modules(PKGC_CLAMAV QUIET IMPORTED_TARGET GLOBAL libclamav)
|
2023-10-21 23:16:20 +02:00
|
|
|
|
|
|
|
if (PKGC_CLAMAV_FOUND)
|
2023-10-24 01:22:09 +02:00
|
|
|
add_library(EXT_SOL::libclamav ALIAS PkgConfig::PKGC_CLAMAV)
|
|
|
|
message("II clamav found using pkg-config")
|
2023-10-21 23:16:20 +02:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2023-10-24 01:22:09 +02:00
|
|
|
if (NOT TARGET EXT_SOL::libclamav)
|
2023-10-21 23:16:20 +02:00
|
|
|
set(ENABLE_LIBCLAMAV_ONLY ON)
|
|
|
|
set(ENABLE_APP OFF)
|
|
|
|
set(ENABLE_TESTS OFF)
|
|
|
|
FetchContent_Declare(clamav
|
|
|
|
GIT_REPOSITORY https://github.com/Cisco-Talos/clamav.git
|
|
|
|
GIT_TAG clamav-1.2.0
|
|
|
|
|
|
|
|
# find_package is tried first
|
2023-10-24 01:22:09 +02:00
|
|
|
FIND_PACKAGE_ARGS NAMES clamav ClamAV libclamav libClamAV
|
2023-10-21 23:16:20 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
FetchContent_MakeAvailable(clamav)
|
2023-10-24 01:22:09 +02:00
|
|
|
|
|
|
|
add_library(EXT_SOL::libclamav ALIAS clamav)
|
2023-10-21 23:16:20 +02:00
|
|
|
endif()
|
|
|
|
|
2023-10-25 17:51:48 +02:00
|
|
|
# TODO: rename when plugin lib is split
|
|
|
|
if (NOT TARGET solanaceae_plugin)
|
|
|
|
FetchContent_Declare(solanaceae_plugin
|
|
|
|
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_plugin.git
|
|
|
|
GIT_TAG master
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(solanaceae_plugin)
|
|
|
|
endif()
|
|
|
|
|