mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
GlitchyEngineHelper project
This commit is contained in:
@@ -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"]
|
||||
@@ -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>
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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.
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
Submodule GlitchyEngineHelper/vendor/xxHash added at b51ffce602
Reference in New Issue
Block a user