mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Support building CSFML as static libraries
Some languages can make use of C foreign function interfaces compiled as static libraries so it's a good idea for CSFML to support this use case.
This commit is contained in:
1 parent
e963079712
commit
055e69520f
3 files changed
+30
-7
No files matched your search
@@ -84,6 +84,8 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define helpers to create portable import / export macros for each module
|
||||
////////////////////////////////////////////////////////////
|
||||
#if !defined(CSFML_STATIC)
|
||||
|
||||
#if defined(CSFML_SYSTEM_WINDOWS)
|
||||
|
||||
// Windows compilers need specific (and different) keywords for export and import
|
||||
@@ -104,6 +106,14 @@
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
// Static build doesn't need import/export macros
|
||||
#define CSFML_API_EXPORT extern "C"
|
||||
#define CSFML_API_IMPORT CSFML_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Cross-platform warning for deprecated functions and classes
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user