Add symbol visibility annotations to glslang-resource-limits library
Among other things, this allows using it as a DLL on Windows.
This commit is contained in:
parent
708d560c23
commit
d7d5ab8f8a
3 changed files with 11 additions and 8 deletions
|
|
@ -227,6 +227,7 @@ set_target_properties(glslang-default-resource-limits PROPERTIES
|
||||||
target_include_directories(glslang-default-resource-limits PUBLIC
|
target_include_directories(glslang-default-resource-limits PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||||
|
glslang_only_export_explicit_symbols(glslang-default-resource-limits)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# source_groups
|
# source_groups
|
||||||
|
|
|
||||||
|
|
@ -38,20 +38,21 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "../Include/ResourceLimits.h"
|
#include "../Include/ResourceLimits.h"
|
||||||
|
#include "../Include/visibility.h"
|
||||||
|
|
||||||
// Return pointer to user-writable Resource to pass through API in
|
// Return pointer to user-writable Resource to pass through API in
|
||||||
// future-proof way.
|
// future-proof way.
|
||||||
extern TBuiltInResource* GetResources();
|
GLSLANG_EXPORT extern TBuiltInResource* GetResources();
|
||||||
|
|
||||||
// These are the default resources for TBuiltInResources, used for both
|
// These are the default resources for TBuiltInResources, used for both
|
||||||
// - parsing this string for the case where the user didn't supply one,
|
// - parsing this string for the case where the user didn't supply one,
|
||||||
// - dumping out a template for user construction of a config file.
|
// - dumping out a template for user construction of a config file.
|
||||||
extern const TBuiltInResource* GetDefaultResources();
|
GLSLANG_EXPORT extern const TBuiltInResource* GetDefaultResources();
|
||||||
|
|
||||||
// Returns the DefaultTBuiltInResource as a human-readable string.
|
// Returns the DefaultTBuiltInResource as a human-readable string.
|
||||||
std::string GetDefaultTBuiltInResourceString();
|
GLSLANG_EXPORT std::string GetDefaultTBuiltInResourceString();
|
||||||
|
|
||||||
// Decodes the resource limits from |config| to |resources|.
|
// Decodes the resource limits from |config| to |resources|.
|
||||||
void DecodeResourceLimits(TBuiltInResource* resources, char* config);
|
GLSLANG_EXPORT void DecodeResourceLimits(TBuiltInResource* resources, char* config);
|
||||||
|
|
||||||
#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
|
#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
|
||||||
|
|
|
||||||
|
|
@ -30,25 +30,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
|
#define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
|
||||||
|
|
||||||
#include "../Include/glslang_c_interface.h"
|
#include "../Include/glslang_c_interface.h"
|
||||||
|
#include "../Include/visibility.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Returns a struct that can be use to create custom resource values.
|
// Returns a struct that can be use to create custom resource values.
|
||||||
glslang_resource_t* glslang_resource(void);
|
GLSLANG_EXPORT glslang_resource_t* glslang_resource(void);
|
||||||
|
|
||||||
// These are the default resources for TBuiltInResources, used for both
|
// These are the default resources for TBuiltInResources, used for both
|
||||||
// - parsing this string for the case where the user didn't supply one,
|
// - parsing this string for the case where the user didn't supply one,
|
||||||
// - dumping out a template for user construction of a config file.
|
// - dumping out a template for user construction of a config file.
|
||||||
const glslang_resource_t* glslang_default_resource(void);
|
GLSLANG_EXPORT const glslang_resource_t* glslang_default_resource(void);
|
||||||
|
|
||||||
// Returns the DefaultTBuiltInResource as a human-readable string.
|
// Returns the DefaultTBuiltInResource as a human-readable string.
|
||||||
// NOTE: User is responsible for freeing this string.
|
// NOTE: User is responsible for freeing this string.
|
||||||
const char* glslang_default_resource_string();
|
GLSLANG_EXPORT const char* glslang_default_resource_string();
|
||||||
|
|
||||||
// Decodes the resource limits from |config| to |resources|.
|
// Decodes the resource limits from |config| to |resources|.
|
||||||
void glslang_decode_resource_limits(glslang_resource_t* resources, char* config);
|
GLSLANG_EXPORT void glslang_decode_resource_limits(glslang_resource_t* resources, char* config);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue