mirror of
https://github.com/InoriRus/Kyty.git
synced 2026-08-28 05:06:40 +00:00
update 3rdparty libs
This commit is contained in:
@@ -6,35 +6,32 @@ if (MSVC AND CLANG)
|
||||
set_source_files_properties(${core_src} PROPERTIES COMPILE_FLAGS "-Wno-pragma-pack")
|
||||
endif()
|
||||
|
||||
add_library(core_obj OBJECT ${core_src})
|
||||
#add_library(core STATIC ${core_src})
|
||||
add_library(core STATIC $<TARGET_OBJECTS:core_obj>)
|
||||
|
||||
target_link_libraries(core sys)
|
||||
target_link_libraries(core math)
|
||||
target_link_libraries(core sdl2)
|
||||
target_link_libraries(core sqlite)
|
||||
target_link_libraries(core lzma)
|
||||
target_link_libraries(core zstd)
|
||||
#add_library(core_obj OBJECT ${core_src})
|
||||
add_library(core STATIC ${core_src})
|
||||
#add_library(core STATIC $<TARGET_OBJECTS:core_obj>)
|
||||
|
||||
target_link_libraries(core sys math SDL2-static sqlite lzma zstd miniz)
|
||||
|
||||
get_property(inc_headers TARGET core PROPERTY INCLUDE_DIRECTORIES)
|
||||
list(APPEND inc_headers
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/sdl2/include
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/sdl2/sdl2/include
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/sqlite/include
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/lzma/include
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/zstd/lib
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/miniz/src
|
||||
)
|
||||
|
||||
target_include_directories(core PRIVATE ${inc_headers})
|
||||
target_include_directories(core_obj PRIVATE ${inc_headers})
|
||||
#target_include_directories(core_obj PRIVATE ${inc_headers})
|
||||
|
||||
list(APPEND check_headers
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
clang_tidy_check(core_obj "" "${check_headers}" "${inc_headers}")
|
||||
#clang_tidy_check(core_obj "" "${check_headers}" "${inc_headers}")
|
||||
clang_tidy_check(core "" "${check_headers}" "${inc_headers}")
|
||||
|
||||
include_what_you_use(core_obj "${inc_headers}")
|
||||
#include_what_you_use(core_obj "${inc_headers}")
|
||||
include_what_you_use(core "${inc_headers}")
|
||||
|
||||
|
||||
|
||||
@@ -14,27 +14,29 @@ extern "C" {
|
||||
|
||||
// IWYU pragma: no_include "7zTypes.h"
|
||||
|
||||
#if KYTY_COMPILER == KYTY_COMPILER_MSVC
|
||||
#define MINIZ_NO_STDIO
|
||||
#define MINIZ_NO_MALLOC
|
||||
#define MZ_ASSERT(x) ASSERT(x)
|
||||
#include "miniz.h"
|
||||
|
||||
//#if KYTY_COMPILER == KYTY_COMPILER_MSVC
|
||||
//#define MINIZ_NO_STDIO
|
||||
//#define MINIZ_NO_MALLOC
|
||||
//#define MZ_ASSERT(x) ASSERT(x)
|
||||
////#pragma GCC diagnostic push
|
||||
////#pragma GCC diagnostic ignored "-Wunused-value"
|
||||
//#include "miniz.c.h"
|
||||
////#pragma GCC diagnostic pop
|
||||
//#else
|
||||
//#define MINIZ_NO_STDIO
|
||||
//#define MINIZ_NO_MALLOC
|
||||
//#define MZ_ASSERT(x) ASSERT(x)
|
||||
//#pragma GCC diagnostic push
|
||||
//#pragma GCC diagnostic ignored "-Wunused-value"
|
||||
#include "miniz.c.h"
|
||||
//#if KYTY_COMPILER == KYTY_COMPILER_MINGW
|
||||
//#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||
//#endif
|
||||
////#pragma GCC diagnostic ignored "-Wenum-compare"
|
||||
//#include "miniz.c.h"
|
||||
//#pragma GCC diagnostic pop
|
||||
#else
|
||||
#define MINIZ_NO_STDIO
|
||||
#define MINIZ_NO_MALLOC
|
||||
#define MZ_ASSERT(x) ASSERT(x)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-value"
|
||||
#if KYTY_COMPILER == KYTY_COMPILER_MINGW
|
||||
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||
#endif
|
||||
//#pragma GCC diagnostic ignored "-Wenum-compare"
|
||||
#include "miniz.c.h"
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
#include "zstd.h"
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ KYTY_SUBSYSTEM_INIT(Core)
|
||||
core_file_init();
|
||||
core_debug_init(parent->GetArgv()[0]);
|
||||
Language::Init();
|
||||
|
||||
Database::Init();
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ void DebugMap::LoadMap()
|
||||
#ifdef DEBUG_MAP_ENABLED
|
||||
printf("exe_name = %s\n", g_exe_name->utf8_str().GetData());
|
||||
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS || KYTY_PLATFORM == KYTY_PLATFORM_LINUX
|
||||
String linker = Debug::GetLinker();
|
||||
String map_file =
|
||||
g_exe_name->FilenameWithoutExtension() + U"_" + Debug::GetCompiler() + U"_" + linker + U"_" + Debug::GetBitness() + U".map";
|
||||
@@ -167,7 +167,7 @@ void DebugMap::LoadCsv()
|
||||
|
||||
printf("exe_name = %s\n", g_exe_name->utf8_str().GetData());
|
||||
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS || KYTY_PLATFORM == KYTY_PLATFORM_LINUX
|
||||
String linker = Debug::GetLinker();
|
||||
String map_file =
|
||||
g_exe_name->FilenameWithoutExtension() + U"_" + Debug::GetCompiler() + U"_" + linker + U"_" + Debug::GetBitness() + U".csv";
|
||||
@@ -843,9 +843,9 @@ const DebugFunctionInfo* DebugMapPrivate::FindFunc(DebugMap* map, uintptr_t addr
|
||||
}
|
||||
|
||||
#if KYTY_PLATFORM != KYTY_PLATFORM_WINDOWS
|
||||
static char* strtok_s(char* _Str, const char* _Delim, char** /*_Context*/)
|
||||
static char* strtok_s(char* s_str, const char* s_delim, char** /*_Context*/)
|
||||
{
|
||||
return strtok(_Str, _Delim);
|
||||
return strtok(s_str, s_delim);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ static bool MSpaceInternalInit(MSpaceContext& ctx, const char* name, void* base,
|
||||
}
|
||||
|
||||
ctx.base = static_cast<MSpaceBlock*>(base);
|
||||
ctx.capacity = (capacity / sizeof(MSpaceBlock)) - 2;
|
||||
ctx.capacity = static_cast<uint32_t>((capacity / sizeof(MSpaceBlock)) - 2);
|
||||
|
||||
ctx.size_of_key_chunk = ctx.capacity;
|
||||
ctx.index_of_key_chunk = 1;
|
||||
@@ -523,7 +523,7 @@ void* MSpaceMalloc(mspace_t msp, size_t size)
|
||||
|
||||
auto* ctx = static_cast<MSpaceContext*>(msp);
|
||||
|
||||
return MSpaceInternalMalloc_align(*ctx, size, 32);
|
||||
return MSpaceInternalMalloc_align(*ctx, static_cast<uint32_t>(size), 32);
|
||||
}
|
||||
|
||||
bool MSpaceFree(mspace_t msp, void* ptr)
|
||||
@@ -554,7 +554,7 @@ void* MSpaceRealloc(mspace_t msp, void* ptr, size_t size)
|
||||
|
||||
auto* ctx = static_cast<MSpaceContext*>(msp);
|
||||
|
||||
return MSpaceInternalRealloc_align(*ctx, ptr, size, 32);
|
||||
return MSpaceInternalRealloc_align(*ctx, ptr, static_cast<uint32_t>(size), 32);
|
||||
}
|
||||
|
||||
} // namespace Kyty::Core
|
||||
|
||||
@@ -82,6 +82,8 @@ public:
|
||||
|
||||
const char* name = s->Id();
|
||||
|
||||
EXIT_IF(FindByName(name) != nullptr);
|
||||
|
||||
auto* nl = new SubsListStruct;
|
||||
|
||||
nl->s = s;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS && KYTY_COMPILER == KYTY_COMPILER_CLANG
|
||||
#define KYTY_WIN_CS
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user