Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
cb4788c7
Commit
cb4788c7
authored
Jul 02, 2020
by
Ben Clayton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GLSLANG_IS_SHARED_LIBRARY define
It was incorrectly always being set, causing linker warnings for MSVC builds. Also simplify the preprocessor nesting in `glslang\Public\ShaderLang.h`
parent
a70f7dea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
CMakeLists.txt
CMakeLists.txt
+1
-1
ShaderLang.h
glslang/Public/ShaderLang.h
+4
-4
No files found.
CMakeLists.txt
View file @
cb4788c7
...
@@ -210,8 +210,8 @@ endif()
...
@@ -210,8 +210,8 @@ endif()
# GLSLANG_IS_SHARED_LIBRARY define, and GLSLANG_EXPORTING to 1 when specifically
# GLSLANG_IS_SHARED_LIBRARY define, and GLSLANG_EXPORTING to 1 when specifically
# building <target>.
# building <target>.
function
(
glslang_only_export_explicit_symbols target
)
function
(
glslang_only_export_explicit_symbols target
)
target_compile_definitions
(
${
target
}
PUBLIC
"GLSLANG_IS_SHARED_LIBRARY=1"
)
if
(
BUILD_SHARED_LIBS
)
if
(
BUILD_SHARED_LIBS
)
target_compile_definitions
(
${
target
}
PUBLIC
"GLSLANG_IS_SHARED_LIBRARY=1"
)
if
(
WIN32
)
if
(
WIN32
)
target_compile_definitions
(
${
target
}
PRIVATE
"GLSLANG_EXPORTING=1"
)
target_compile_definitions
(
${
target
}
PRIVATE
"GLSLANG_EXPORTING=1"
)
else
()
else
()
...
...
glslang/Public/ShaderLang.h
View file @
cb4788c7
...
@@ -58,13 +58,13 @@
...
@@ -58,13 +58,13 @@
#endif
#endif
#elif __GNUC__ >= 4
#elif __GNUC__ >= 4
#define GLSLANG_EXPORT __attribute__((visibility("default")))
#define GLSLANG_EXPORT __attribute__((visibility("default")))
#else
#define GLSLANG_EXPORT
#endif
#endif
#else // GLSLANG_IS_SHARED_LIBRARY
#define GLSLANG_EXPORT
#endif // GLSLANG_IS_SHARED_LIBRARY
#endif // GLSLANG_IS_SHARED_LIBRARY
#ifndef GLSLANG_EXPORT
#define GLSLANG_EXPORT
#endif
//
//
// This is the platform independent interface between an OGL driver
// This is the platform independent interface between an OGL driver
// and the shading language compiler/linker.
// and the shading language compiler/linker.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment