Fix definitions

This commit is contained in:
Acedia / Melancholy 2023-02-12 23:03:08 +06:30
parent b0f2a2bf1e
commit 033397fa0e
2 changed files with 4 additions and 4 deletions

View file

@ -142,7 +142,7 @@ if(LUAU_EXTERN_C)
target_compile_definitions(Luau.VM PUBLIC LUA_USE_LONGJMP=1) target_compile_definitions(Luau.VM PUBLIC LUA_USE_LONGJMP=1)
if(LUAU_EXPORT_DLL) if(LUAU_EXPORT_DLL)
target_compile_definitions(Luau.VM PUBLIC LUA_API_C_EXPORT) target_compile_definitions(Luau.VM PUBLIC LUA_API_C_EXPORT)
target_compile_definitions(Luau.Compiler PUBLIC LUACOPDE_API_C_EXPORT) target_compile_definitions(Luau.Compiler PUBLIC LUACODE_API_C_EXPORT)
else() else()
target_compile_definitions(Luau.VM PUBLIC LUA_API=extern\"C\") target_compile_definitions(Luau.VM PUBLIC LUA_API=extern\"C\")
target_compile_definitions(Luau.Compiler PUBLIC LUACODE_API=extern\"C\") target_compile_definitions(Luau.Compiler PUBLIC LUACODE_API=extern\"C\")
@ -150,7 +150,7 @@ if(LUAU_EXTERN_C)
else() else()
if(LUAU_EXPORT_DLL) if(LUAU_EXPORT_DLL)
target_compile_definitions(Luau.VM PUBLIC LUA_API_EXPORT) target_compile_definitions(Luau.VM PUBLIC LUA_API_EXPORT)
target_compile_definitions(Luau.Compiler PUBLIC LUACOPDE_API_EXPORT) target_compile_definitions(Luau.Compiler PUBLIC LUACODE_API_EXPORT)
endif() endif()
endif() endif()

View file

@ -4,11 +4,11 @@
#include <stddef.h> #include <stddef.h>
// Can be used to export public APIs to DLL // Can be used to export public APIs to DLL
#ifdef LUA_API_C_EXPORT #ifdef LUACODE_API_C_EXPORT
#define LUACODE_API extern "C" __declspec(dllexport) #define LUACODE_API extern "C" __declspec(dllexport)
#endif #endif
#ifdef LUA_API_EXPORT #ifdef LUACODE_API_EXPORT
#define LUACODE_API extern __declspec(dllexport) #define LUACODE_API extern __declspec(dllexport)
#endif #endif