GlitchyEngineHelper project

This commit is contained in:
Simon Lübeß
2022-04-09 12:33:05 +02:00
parent d47bc37886
commit b94c84d304
8 changed files with 135 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
FileVersion = 1
Dependencies = {GlitchLog = "*", corlib = "*", DirectX = "*", DirectXTK = "*", FreeType = "*", cgltf-beef = "*", msdfgen-beef = "*", ImGui = "*", ImGuiImplDX11 = "*", ImGuiImplWin32 = "*", ImGuizmo = "*", Beefy2D = "*", LodePng = "*"}
Dependencies = {GlitchLog = "*", corlib = "*", DirectX = "*", DirectXTK = "*", FreeType = "*", cgltf-beef = "*", msdfgen-beef = "*", ImGui = "*", ImGuiImplDX11 = "*", ImGuiImplWin32 = "*", ImGuizmo = "*", Beefy2D = "*", LodePng = "*", GlitchyEngineHelper = "*"}
[Project]
Name = "GlitchyEngine"
+10
View File
@@ -0,0 +1,10 @@
FileVersion = 1
Dependencies = {corlib = "*", corlib = "*"}
[Project]
Name = "GlitchyEngineHelper"
TargetType = "BeefLib"
StartupObject = "GlitchyEngineHelper.Program"
[Configs.Debug.Win64]
LibPaths = ["$(ProjectDir)/out/build/x64-debug/GlitchyEngineHelper.lib"]
+13
View File
@@ -0,0 +1,13 @@
# CMakeList.txt : CMake project for GlitchyEngineHelper, include source and define
# project specific logic here.
#
cmake_minimum_required (VERSION 3.15)
project ("GlitchyEngineHelper")
# Add source to this project's executable.
add_library (GlitchyEngineHelper "GlitchyEngineHelper.cpp" "GlitchyEngineHelper.h" "vendor/xxHash/xxhash.c" "vendor/xxHash/xxhash.h")
# Use statically linked multithreaded MSVC runtime
set_property(TARGET GlitchyEngineHelper PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
#$<$<CONFIG:Debug>:Debug>
+61
View File
@@ -0,0 +1,61 @@
{
"version": 3,
"configurePresets": [
{
"name": "windows-base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "x64-debug",
"displayName": "x64 Debug",
"inherits": "windows-base",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "x64-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
"inherits": "windows-base",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x86-release",
"displayName": "x86 Release",
"inherits": "x86-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
}
]
}
@@ -0,0 +1,16 @@
// GlitchyEngineHelper.cpp : Defines the entry point for the application.
//
#include "GlitchyEngineHelper.h"
using namespace std;
GE_EXPORT int GE_CALLTYPE test(int x, int y)
{
return x + y;
}
GE_EXPORT XXH64_hash_t bla(void* buffer, size_t size, XXH64_hash_t seed)
{
return XXH64(buffer, size, seed);
}
+11
View File
@@ -0,0 +1,11 @@
// GlitchyEngineHelper.h : Include file for standard system include files,
// or project specific include files.
#pragma once
#define GE_EXPORT extern "C" __declspec(dllexport)
#define GE_CALLTYPE __stdcall
#include "vendor/xxHash/xxhash.h"
// TODO: Reference additional headers your program requires here.
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Interop;
namespace xxHash
{
struct XXH64_hash : uint64{}
static
{
[LinkName(.C)]
public static extern XXH64_hash XXH64(void* buffer, c_size size, XXH64_hash seed = 0);
}
static class xxHash
{
[Inline]
public static XXH64_hash ComputeHash(StringView string, XXH64_hash seed = 0)
{
return XXH64(string.Ptr, (.)string.Length, seed);
}
}
}
Submodule GlitchyEngineHelper/vendor/xxHash added at b51ffce602