diff --git a/CMakeLists.txt b/CMakeLists.txt index 25f7998..43c7ebc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,9 @@ else() # Right now GLSDL is the only rendering device for Linux set(WHOA_BUILD_GLSDL 1) endif() +if (WHOA_BUILD_GLSDL) + add_definitions(-DWHOA_BUILD_GLSDL) +endif() # FMOD option(WHOA_BUILD_FMOD "Disable/Enable the use of the FMOD sound API. This introduces a dependency on a proprietary FMOD dynamically linked library." 0) diff --git a/src/gx/CGxDevice.cpp b/src/gx/CGxDevice.cpp index b0e90dd..404637e 100644 --- a/src/gx/CGxDevice.cpp +++ b/src/gx/CGxDevice.cpp @@ -127,7 +127,7 @@ CGxDevice* CGxDevice::NewOpenGl() { return nullptr; } -#if defined(WHOA_SYSTEM_WIN) || defined(WHOA_SYSTEM_LINUX) +#if defined(WHOA_BUILD_GLSDL) CGxDevice* CGxDevice::NewGLSDL() { auto m = SMemAlloc(sizeof(CGxDeviceGLSDL), __FILE__, __LINE__, 0x0); return new (m) CGxDeviceGLSDL(); diff --git a/src/gx/CGxDevice.hpp b/src/gx/CGxDevice.hpp index 7189403..c59e3f2 100644 --- a/src/gx/CGxDevice.hpp +++ b/src/gx/CGxDevice.hpp @@ -57,7 +57,7 @@ class CGxDevice { #if defined(WHOA_SYSTEM_MAC) static CGxDevice* NewGLL(); #endif -#if defined(WHOA_SYSTEM_LINUX) || defined(WHOA_SYSTEM_WIN) +#if defined(WHOA_BUILD_GLSDL) static CGxDevice* NewGLSDL(); #endif static CGxDevice* NewOpenGl();