fix: correct dll specs + copy dlls

This commit is contained in:
2025-10-17 13:23:49 +02:00
parent 3f18601ffc
commit 86825103ee
4 changed files with 46 additions and 19 deletions

View File

@ -1,9 +1,5 @@
#pragma once
#ifndef _WIN32
#define GLEW_STATIC
#endif
#include <memory>
#ifdef _WIN32

View File

@ -1,9 +1,20 @@
#pragma once
#if defined(_WIN32) && defined(ENGINE_BUILD_SHARED)
#define ENGINE_API __declspec(dllexport)
#elif defined(_WIN32)
#define ENGINE_API __declspec(dllimport)
// For static libs, ENGINE_API should be empty.
#if defined(_WIN32)
#if defined(ENGINE_BUILD_SHARED)
#if defined(ENGINE_EXPORTS)
#define ENGINE_API __declspec(dllexport)
#else
#define ENGINE_API __declspec(dllimport)
#endif
#else
#define ENGINE_API
#endif
#else
#define ENGINE_API __attribute__((visibility("default")))
#if defined(ENGINE_BUILD_SHARED)
#define ENGINE_API __attribute__((visibility("default")))
#else
#define ENGINE_API
#endif
#endif