diff --git a/CMakeLists.txt b/CMakeLists.txt index 43570035..ffea36ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required(VERSION 3.7) 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 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/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 option(ENABLE_API21 "Build for 2.1 API." OFF) 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 if(WIN32 AND MINGW) option(COPY_DEPENDENCIES "Copy deppendent DLLs into the deps folder." OFF) diff --git a/module/SqBase.hpp b/module/SqBase.hpp index d84e466a..9a6b75bd 100644 --- a/module/SqBase.hpp +++ b/module/SqBase.hpp @@ -33,12 +33,13 @@ */ #if defined(_WIN32) || defined(__WIN32__) || defined(_WIN) || defined(__WIN__) + #error Squirrel Module does not support 32-bit Windows anymore // Windows x32 - #define SQMOD_OS_WINDOWS - #define SQMOD_OS_32 - #define SQMOD_OS_WINDOWS32 - #define SQMOD_ARCHITECTURE 1 - #define SQMOD_PLATFORM 1 + //#define SQMOD_OS_WINDOWS + //#define SQMOD_OS_32 + //#define SQMOD_OS_WINDOWS32 + //#define SQMOD_ARCHITECTURE 1 + //#define SQMOD_PLATFORM 1 #elif defined(_WIN64) || defined(__WIN64__) // Windows x64 #define SQMOD_OS_WINDOWS @@ -53,13 +54,14 @@ #if __x86_64__ || __ppc64__ #define SQMOD_OS_64 #define SQMOD_OS_LINUX64 - #define SQMOD_ARCHITECTURE 2 + #define SQMOD_ARCHITECTURE 2 #define SQMOD_PLATFORM 2 #else - #define SQMOD_OS_32 - #define SQMOD_OS_LINUX32 - #define SQMOD_ARCHITECTURE 1 - #define SQMOD_PLATFORM 2 + #error Squirrel Module does not support 32-bit Linux anymore + //#define SQMOD_OS_32 + //#define SQMOD_OS_LINUX32 + //#define SQMOD_ARCHITECTURE 1 + //#define SQMOD_PLATFORM 2 #endif #endif #else @@ -423,7 +425,7 @@ enum EntityType #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_strnicmp(a,b,n) strnicmp(a,b,n) #else