updated build system
This commit is contained in:
@ -165,6 +165,50 @@ extern "C" {
|
||||
#endif // defined(__cplusplus)
|
||||
#endif // defined(PROJECT_ENABLE_FZF)
|
||||
|
||||
#if defined(PROJECT_ENABLE_LIBDSM)
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif // defined(__cplusplus)
|
||||
#include "bdsm/bdsm.h"
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
struct netbios_ns_deleter final {
|
||||
void operator()(netbios_ns *ns) {
|
||||
if (ns != nullptr) {
|
||||
netbios_ns_destroy(ns);
|
||||
}
|
||||
}
|
||||
};
|
||||
using netbios_ns_t = std::unique_ptr<netbios_ns, netbios_ns_deleter>;
|
||||
|
||||
inline const auto smb_session_deleter = [](smb_session *session) {
|
||||
if (session != nullptr) {
|
||||
smb_session_destroy(session);
|
||||
}
|
||||
};
|
||||
using smb_session_t = std::shared_ptr<smb_session>;
|
||||
|
||||
struct smb_stat_deleter final {
|
||||
void operator()(smb_stat st) {
|
||||
if (st != nullptr) {
|
||||
smb_stat_destroy(st);
|
||||
}
|
||||
}
|
||||
};
|
||||
using smb_stat_t = std::unique_ptr<smb_file, smb_stat_deleter>;
|
||||
|
||||
struct smb_stat_list_deleter final {
|
||||
void operator()(smb_file *list) {
|
||||
if (list != nullptr) {
|
||||
smb_stat_list_destroy(list);
|
||||
}
|
||||
}
|
||||
};
|
||||
using smb_stat_list_t = std::unique_ptr<smb_file, smb_stat_list_deleter>;
|
||||
#endif // defined(__cplusplus)
|
||||
#endif // defined(PROJECT_ENABLE_LIBDSM)
|
||||
|
||||
#if defined(PROJECT_ENABLE_LIBEVENT)
|
||||
#include "event2/buffer.h"
|
||||
#include "event2/bufferevent.h"
|
||||
@ -173,20 +217,68 @@ extern "C" {
|
||||
#include "event2/util.h"
|
||||
#endif // defined(PROJECT_ENABLE_LIBEVENT)
|
||||
|
||||
#if defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
#include "sodium.h"
|
||||
#endif // defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
|
||||
#if defined(PROJECT_ENABLE_SDL)
|
||||
#include "SDL.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_joystick.h"
|
||||
#endif // defined(PROJECT_ENABLE_SDL)
|
||||
|
||||
#if defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
#include "sodium.h"
|
||||
#endif // defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
|
||||
#if defined(PROJECT_ENABLE_SQLITE)
|
||||
#include "sqlite3.h"
|
||||
#endif // defined(PROJECT_ENABLE_SQLITE)
|
||||
|
||||
#if defined(PROJECT_ENABLE_VLC)
|
||||
#include <vlc/vlc.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
[[nodiscard]] inline auto get_libvlc_error_msg() -> std::string {
|
||||
const auto *msg = libvlc_errmsg();
|
||||
return msg == nullptr ? "none" : msg;
|
||||
}
|
||||
|
||||
struct vlc_deleter final {
|
||||
void operator()(libvlc_instance_t *inst) {
|
||||
if (inst != nullptr) {
|
||||
libvlc_release(inst);
|
||||
}
|
||||
}
|
||||
};
|
||||
using vlc_t = std::unique_ptr<libvlc_instance_t, vlc_deleter>;
|
||||
|
||||
struct vlc_media_deleter final {
|
||||
void operator()(libvlc_media_t *media) {
|
||||
if (media != nullptr) {
|
||||
libvlc_media_release(media);
|
||||
}
|
||||
}
|
||||
};
|
||||
using vlc_media_t = std::unique_ptr<libvlc_media_t, vlc_media_deleter>;
|
||||
|
||||
struct vlc_media_list_deleter final {
|
||||
void operator()(libvlc_media_list_t *media_list) {
|
||||
if (media_list != nullptr) {
|
||||
libvlc_media_list_release(media_list);
|
||||
}
|
||||
}
|
||||
};
|
||||
using vlc_media_list_t =
|
||||
std::unique_ptr<libvlc_media_list_t, vlc_media_list_deleter>;
|
||||
|
||||
struct vlc_string_deleter final {
|
||||
void operator()(char *str) {
|
||||
if (str != nullptr) {
|
||||
libvlc_free(str);
|
||||
}
|
||||
}
|
||||
};
|
||||
using vlc_string_t = std::unique_ptr<char, vlc_string_deleter>;
|
||||
#endif // defined(__cplusplus)
|
||||
#endif // defined(PROJECT_ENABLE_VLC)
|
||||
|
||||
#if !defined(fstat64)
|
||||
#define fstat64 fstat
|
||||
#endif // !defined(fstat64)
|
||||
|
Reference in New Issue
Block a user