1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Officially declare the plugin as 64-bit only.

Due to various limitations, this plug-in no longer compiles on 32-bit platforms.
This commit is contained in:
Sandu Liviu Catalin 2021-09-10 20:06:25 +03:00
parent b46535dedf
commit 4876b37f7f
2 changed files with 19 additions and 12 deletions

View File

@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.7) cmake_minimum_required(VERSION 3.7)
project(SqMod) project(SqMod)
# This plug-in only works on 64-bit
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
message(FATAL_ERROR "SqMod does not support 32-but platforms anymore.")
endif()
# Tell CMake where to find our scripts # Tell CMake where to find our scripts
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vendor/POCO/cmake) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vendor/POCO/cmake)
@ -8,7 +13,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vendor/POCO/cmake)
# Several plugin options # Several plugin options
option(ENABLE_API21 "Build for 2.1 API." OFF) option(ENABLE_API21 "Build for 2.1 API." OFF)
option(ENABLE_OFFICIAL "Enable compatibility with official legacy plug-in" ON) option(ENABLE_OFFICIAL "Enable compatibility with official legacy plug-in" ON)
option(FORCE_32BIT_BIN "Create a 32-bit executable binary if the compiler defaults to 64-bit." OFF) #option(FORCE_32BIT_BIN "Create a 32-bit executable binary if the compiler defaults to 64-bit." OFF)
# This option should only be available in certain conditions # This option should only be available in certain conditions
if(WIN32 AND MINGW) if(WIN32 AND MINGW)
option(COPY_DEPENDENCIES "Copy deppendent DLLs into the deps folder." OFF) option(COPY_DEPENDENCIES "Copy deppendent DLLs into the deps folder." OFF)

View File

@ -33,12 +33,13 @@
*/ */
#if defined(_WIN32) || defined(__WIN32__) || defined(_WIN) || defined(__WIN__) #if defined(_WIN32) || defined(__WIN32__) || defined(_WIN) || defined(__WIN__)
#error Squirrel Module does not support 32-bit Windows anymore
// Windows x32 // Windows x32
#define SQMOD_OS_WINDOWS //#define SQMOD_OS_WINDOWS
#define SQMOD_OS_32 //#define SQMOD_OS_32
#define SQMOD_OS_WINDOWS32 //#define SQMOD_OS_WINDOWS32
#define SQMOD_ARCHITECTURE 1 //#define SQMOD_ARCHITECTURE 1
#define SQMOD_PLATFORM 1 //#define SQMOD_PLATFORM 1
#elif defined(_WIN64) || defined(__WIN64__) #elif defined(_WIN64) || defined(__WIN64__)
// Windows x64 // Windows x64
#define SQMOD_OS_WINDOWS #define SQMOD_OS_WINDOWS
@ -56,10 +57,11 @@
#define SQMOD_ARCHITECTURE 2 #define SQMOD_ARCHITECTURE 2
#define SQMOD_PLATFORM 2 #define SQMOD_PLATFORM 2
#else #else
#define SQMOD_OS_32 #error Squirrel Module does not support 32-bit Linux anymore
#define SQMOD_OS_LINUX32 //#define SQMOD_OS_32
#define SQMOD_ARCHITECTURE 1 //#define SQMOD_OS_LINUX32
#define SQMOD_PLATFORM 2 //#define SQMOD_ARCHITECTURE 1
//#define SQMOD_PLATFORM 2
#endif #endif
#endif #endif
#else #else
@ -423,7 +425,7 @@ enum EntityType
#define SQMOD_CONCAT(a,b) SQMOD_CONCAT_(a,b) #define SQMOD_CONCAT(a,b) SQMOD_CONCAT_(a,b)
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
#ifdef _WIN32 #ifdef SQMOD_OS_WINDOWS
#define sqmod_stricmp(a,b) stricmp(a,b) #define sqmod_stricmp(a,b) stricmp(a,b)
#define sqmod_strnicmp(a,b,n) strnicmp(a,b,n) #define sqmod_strnicmp(a,b,n) strnicmp(a,b,n)
#else #else