summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor <egor.yusov@gmail.com>2018-02-10 17:08:34 +0000
committerEgor <egor.yusov@gmail.com>2018-02-10 17:08:34 +0000
commit1edc3a81f2ee595a791cc721395895369055d3bf (patch)
treeccb4766e89975a7e38170f557d45b777129324d3 /Graphics/GraphicsEngineOpenGL
parentReplaced #ifdef PLATFORM_XXX with #if PLATFORM_XXX (diff)
downloadDiligentCore-1edc3a81f2ee595a791cc721395895369055d3bf.tar.gz
DiligentCore-1edc3a81f2ee595a791cc721395895369055d3bf.zip
Replaced #ifdef ENGINE_DLL with #if ENGINE_DLL
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/CMakeLists.txt4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/readme.md2
3 files changed, 4 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
index a024c899..02196fc7 100644
--- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
+++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
@@ -172,8 +172,6 @@ if(PLATFORM_WIN32)
set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} glew-static opengl32.lib)
elseif(PLATFORM_ANDROID)
set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} GLESv3 EGL android)
- target_compile_definitions(GraphicsEngineOpenGL-static PRIVATE BUILDING_DLL)
- target_compile_definitions(GraphicsEngineOpenGL-shared PRIVATE BUILDING_DLL)
set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) # -fvisibility=hidden
elseif(PLATFORM_LINUX)
set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} glew-static)
@@ -196,7 +194,7 @@ endif()
target_link_libraries(GraphicsEngineOpenGL-static PRIVATE ${PRIVATE_DEPENDENCIES} PUBLIC ${PUBLIC_DEPENDENCIES})
target_link_libraries(GraphicsEngineOpenGL-shared PRIVATE ${PRIVATE_DEPENDENCIES} PUBLIC ${PUBLIC_DEPENDENCIES})
-target_compile_definitions(GraphicsEngineOpenGL-shared PUBLIC ENGINE_DLL)
+target_compile_definitions(GraphicsEngineOpenGL-shared PUBLIC ENGINE_DLL=1 PRIVATE BUILDING_DLL=1)
if(PLATFORM_WIN32)
set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES
diff --git a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h
index 902102f5..77173bb3 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h
@@ -38,8 +38,8 @@
#elif PLATFORM_ANDROID || PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS
-# ifdef ENGINE_DLL
-# ifdef BUILDING_DLL
+# if ENGINE_DLL
+# if BUILDING_DLL
// https://gcc.gnu.org/wiki/Visibility
# define API_QUALIFIER __attribute__((visibility("default")))
# else
diff --git a/Graphics/GraphicsEngineOpenGL/readme.md b/Graphics/GraphicsEngineOpenGL/readme.md
index ef99a835..8c4c73ea 100644
--- a/Graphics/GraphicsEngineOpenGL/readme.md
+++ b/Graphics/GraphicsEngineOpenGL/readme.md
@@ -13,7 +13,7 @@ using namespace Diligent;
// ...
-#ifdef ENGINE_DLL
+#if ENGINE_DLL
GetEngineFactoryOpenGLType GetEngineFactoryOpenGL;
if( !LoadGraphicsEngineOpenGL(GetEngineFactoryOpenGL) )
return FALSE;