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:
Chris Thrasher committed 2024-09-07 15:17:05 -06:00
1 parent e963079712
commit 055e69520f
3 files changed
+30 -7

No files matched your search

+10
View File
@@ -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
//