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
5d4d2119
Unverified
Commit
5d4d2119
authored
Jul 02, 2020
by
John Kessenich
Committed by
GitHub
Jul 02, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2303 from ben-clayton/limit-public-2
glslang: Only export public interface for SOs
parents
9e4429f3
d64e8599
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
CMakeLists.txt
CMakeLists.txt
+15
-0
StandAlone.cpp
StandAlone/StandAlone.cpp
+1
-1
CMakeLists.txt
glslang/CMakeLists.txt
+2
-0
ShaderLang.h
glslang/Public/ShaderLang.h
+0
-0
No files found.
CMakeLists.txt
View file @
5d4d2119
...
...
@@ -205,6 +205,21 @@ if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
add_subdirectory
(
External
)
endif
()
# glslang_only_export_explicit_symbols() makes the symbol visibility hidden by
# default for <target> when building shared libraries, and sets the
# GLSLANG_IS_SHARED_LIBRARY define, and GLSLANG_EXPORTING to 1 when specifically
# building <target>.
function
(
glslang_only_export_explicit_symbols target
)
target_compile_definitions
(
${
target
}
PUBLIC
"GLSLANG_IS_SHARED_LIBRARY=1"
)
if
(
BUILD_SHARED_LIBS
)
if
(
WIN32
)
target_compile_definitions
(
${
target
}
PRIVATE
"GLSLANG_EXPORTING=1"
)
else
()
target_compile_options
(
${
target
}
PRIVATE
"-fvisibility=hidden"
)
endif
()
endif
()
endfunction
()
if
(
NOT TARGET SPIRV-Tools-opt
)
set
(
ENABLE_OPT OFF
)
endif
()
...
...
StandAlone/StandAlone.cpp
View file @
5d4d2119
...
...
@@ -63,7 +63,7 @@
#include "../glslang/OSDependent/osinclude.h"
extern
"C"
{
SH_IMPORT
_EXPORT
void
ShOutputHtml
();
GLSLANG
_EXPORT
void
ShOutputHtml
();
}
// Command-line options
...
...
glslang/CMakeLists.txt
View file @
5d4d2119
...
...
@@ -132,6 +132,8 @@ target_include_directories(glslang PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/..>
$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>
)
glslang_only_export_explicit_symbols
(
glslang
)
if
(
WIN32 AND BUILD_SHARED_LIBS
)
set_target_properties
(
glslang PROPERTIES PREFIX
""
)
endif
()
...
...
glslang/Public/ShaderLang.h
View file @
5d4d2119
This diff is collapsed.
Click to expand it.
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