mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-22 08:07:50 +00:00
[cmake] refactor: CPM over vcpkg (#250)
Completely replaces vcpkg with CPM for all "system" dependencies. Primarily needed for Android and Windows. Also uses my OpenSSL CI for those two platforms. In theory, improves configure and build time by a LOT and makes things much easier to manage Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/250 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
c36cc0d3ee
commit
3e55dc6352
67 changed files with 584 additions and 10752 deletions
|
@ -261,9 +261,24 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(common PUBLIC Boost::headers fmt::fmt
|
||||
stb::headers Threads::Threads)
|
||||
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd LLVM::Demangle)
|
||||
if (BOOST_NO_HEADERS)
|
||||
target_link_libraries(common PUBLIC Boost::algorithm Boost::icl Boost::pool)
|
||||
else()
|
||||
target_link_libraries(common PUBLIC Boost::headers)
|
||||
endif()
|
||||
|
||||
if (lz4_ADDED)
|
||||
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
|
||||
endif()
|
||||
|
||||
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads)
|
||||
target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle)
|
||||
|
||||
if (TARGET libzstd_static)
|
||||
target_link_libraries(common PRIVATE libzstd_static)
|
||||
else()
|
||||
target_link_libraries(common PRIVATE zstd)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
# For ASharedMemory_create
|
||||
|
|
|
@ -183,18 +183,18 @@ public:
|
|||
FileType type = FileType::BinaryFile,
|
||||
FileShareFlag flag = FileShareFlag::ShareReadOnly);
|
||||
|
||||
#ifdef _WIN32
|
||||
template <typename Path>
|
||||
void Open(const Path& path, FileAccessMode mode, FileType type = FileType::BinaryFile,
|
||||
FileShareFlag flag = FileShareFlag::ShareReadOnly) {
|
||||
using ValueType = typename Path::value_type;
|
||||
if constexpr (IsChar<ValueType>) {
|
||||
Open(ToU8String(path), mode, type, flag);
|
||||
} else {
|
||||
Open(std::filesystem::path{path}, mode, type, flag);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// #ifdef _WIN32
|
||||
// template <typename Path>
|
||||
// void Open(const Path& path, FileAccessMode mode, FileType type = FileType::BinaryFile,
|
||||
// FileShareFlag flag = FileShareFlag::ShareReadOnly) {
|
||||
// using ValueType = typename Path::value_type;
|
||||
// if constexpr (IsChar<ValueType>) {
|
||||
// Open(ToU8String(path), mode, type, flag);
|
||||
// } else {
|
||||
// Open(std::filesystem::path{path}, mode, type, flag);
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
|
||||
/// Closes the file if it is opened.
|
||||
void Close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue