Build botan with ExternalProject and without amalgamation
All checks were successful
/ Build the server (push) Successful in 3m4s
All checks were successful
/ Build the server (push) Successful in 3m4s
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
# TODO: repo with dependencies, ExternalProject_Add(), FetchContent
|
||||
|
||||
add_subdirectory(spdlog-1.12.0)
|
||||
add_subdirectory(restbed-4.8)
|
||||
|
||||
add_custom_command(
|
||||
COMMAND ./configure.py ARGS --amalgamation --disable-shared --minimized-build --enable-modules=argon2fmt,hotp,base32,auto_rng,system_rng,tls13,certstor_system,certstor_flatfile,md5
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Botan-3.2.0
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Botan-3.2.0/botan_all.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Botan-3.2.0/botan_all.h
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(project_botan
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Botan-3.2.0
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/botan
|
||||
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Botan-3.2.0/configure.py --with-build-dir=<BINARY_DIR> --prefix=<INSTALL_DIR> --disable-shared --minimized-build --build-targets=static --without-sphinx --without-rst2man --enable-modules=argon2fmt,hotp,base32,auto_rng,system_rng,tls13,certstor_system,certstor_flatfile,md5
|
||||
BUILD_COMMAND make -j libs
|
||||
BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/botan/lib/libbotan-3.a"
|
||||
INSTALL_COMMAND make install
|
||||
USES_TERMINAL_BUILD YES
|
||||
USES_TERMINAL_INSTALL YES
|
||||
)
|
||||
add_library(botan STATIC Botan-3.2.0/botan_all.cpp Botan-3.2.0/botan_all.h)
|
||||
target_include_directories(botan PUBLIC Botan-3.2.0)
|
||||
add_library(botan INTERFACE IMPORTED)
|
||||
target_link_libraries(botan INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/botan/lib/libbotan-3.a")
|
||||
target_include_directories(botan INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/botan/include/botan-3")
|
||||
add_dependencies(botan project_botan)
|
||||
|
||||
add_library(miniz STATIC miniz/miniz.c miniz/miniz.h)
|
||||
target_include_directories(miniz PUBLIC miniz)
|
||||
|
||||
Reference in New Issue
Block a user