mirror of
https://github.com/anope/anope.git
synced 2026-07-04 20:33:12 +02:00
Build vendored libraries as static libraries and link against them.
This avoids rebuilding code we've already built.
This commit is contained in:
@@ -50,7 +50,7 @@ macro(inline_cmake TARGET FILE)
|
||||
set(CODE "${CODE}\n${CLEAN_LINE}")
|
||||
endif()
|
||||
elseif(LINE MATCHES "^/// BEGIN CMAKE$")
|
||||
message(STATUS "Executing inline CMake code for ${TARGET}")
|
||||
message(DEBUG "Executing inline CMake code for ${TARGET}")
|
||||
set(IN_CODE ON)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/// BEGIN CMAKE
|
||||
/// target_link_libraries(${SO} PRIVATE "vendored_yyjson")
|
||||
/// END CMAKE
|
||||
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
#include "yyjson/yyjson.c"
|
||||
#include "yyjson/yyjson.h"
|
||||
|
||||
#include "module.h"
|
||||
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/// BEGIN CMAKE
|
||||
/// target_link_libraries(${SO} PRIVATE "vendored_bcrypt")
|
||||
/// END CMAKE
|
||||
|
||||
#include <climits>
|
||||
#include <random>
|
||||
|
||||
#include "bcrypt/crypt_blowfish.c"
|
||||
#include "bcrypt/crypt_blowfish.h"
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/encryption.h"
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/// BEGIN CMAKE
|
||||
/// target_link_libraries(${SO} PRIVATE "vendored_md5")
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/encryption.h"
|
||||
|
||||
#include "md5/md5.c"
|
||||
#include "md5/md5.h"
|
||||
|
||||
class MD5Context final
|
||||
: public Encryption::Context
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/// BEGIN CMAKE
|
||||
/// target_link_libraries(${SO} PRIVATE "vendored_sha1")
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/encryption.h"
|
||||
|
||||
#include "sha1/sha1.c"
|
||||
#include "sha1/sha1.h"
|
||||
|
||||
class SHA1Context final
|
||||
: public Encryption::Context
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/// BEGIN CMAKE
|
||||
/// target_link_libraries(${SO} PRIVATE "vendored_sha2")
|
||||
/// END CMAKE
|
||||
|
||||
#include <climits>
|
||||
#include <random>
|
||||
|
||||
#include "sha2/sha2.c"
|
||||
#include "sha2/sha2.h"
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/encryption.h"
|
||||
|
||||
@@ -12,11 +12,17 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/// BEGIN CMAKE
|
||||
/// target_link_libraries(${SO} PRIVATE "vendored_yyjson")
|
||||
/// END CMAKE
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/rpc.h"
|
||||
#include "modules/httpd.h"
|
||||
|
||||
#include "yyjson/yyjson.c"
|
||||
#include "yyjson/yyjson.h"
|
||||
|
||||
template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
|
||||
template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
|
||||
|
||||
Reference in New Issue
Block a user