1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-09-19 18:01:25 +03:00

New hamcorebuilder implementation, independent from Cedar and Mayaqua

This new implementation can be easily compiled and executed without the need for other components to be present.

It relies on standard C functions, aside from stat() which is part of POSIX but available on Windows as well.

There's only one third-party dependency, which is tinydir: a single-file header-only library for traversing directories.
This commit is contained in:
Davide Beatrici
2021-02-26 07:06:26 +01:00
parent 5ed11a0270
commit 1301dc93c6
10 changed files with 545 additions and 81 deletions
+20 -2
View File
@@ -1,3 +1,21 @@
add_executable(hamcorebuilder hamcorebuilder.c)
include(TestBigEndian)
target_link_libraries(hamcorebuilder cedar mayaqua)
add_executable(hamcorebuilder
main.c
FileSystem.c
FileSystem.h
)
if(WIN32)
target_compile_definitions(hamcorebuilder PRIVATE "OS_WINDOWS")
endif()
test_big_endian(BIG_ENDIAN)
if(BIG_ENDIAN)
target_compile_definitions(hamcorebuilder PRIVATE "BYTE_ORDER_BIG_ENDIAN")
endif()
target_include_directories(hamcorebuilder PRIVATE "${TOP_DIRECTORY}/3rdparty/tinydir")
find_package(ZLIB REQUIRED)
target_link_libraries(hamcorebuilder PRIVATE ZLIB::ZLIB)