-
Notifications
You must be signed in to change notification settings - Fork 384
Add building support for SwiftPM #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
eb9fe90
8e316bd
d2fe08f
d1a4746
3c1de2a
b0a2c09
962f119
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,7 @@ YM M9 MM MM MM MM MM d' `MM. MM MM d' `MM. | |
| #endif // _MSC_VER | ||
|
|
||
| // ===== OpenXLSX Includes ===== // | ||
| #include "OpenXLSX-Exports.hpp" | ||
| #include "include-exports-header.hpp" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As part of addressing (4), I modified the code to include the indirect header. |
||
|
|
||
| #include <memory> | ||
| #include <string> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ YM M9 MM MM MM MM MM d' `MM. MM MM d' `MM. | |
|
|
||
| // ===== pugixml.hpp needed for pugi::impl::xml_memory_page_type_mask, pugi::xml_node_type, pugi::char_t, pugi::node_element, pugi::xml_node, pugi::xml_attribute, pugi::xml_document | ||
| #include <external/pugixml/pugixml.hpp> // not sure why the full include path is needed within the header file | ||
| #include <XLException.hpp> | ||
| #include "XLException.hpp" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is part of the changes made to address (3). |
||
|
|
||
| namespace { // anonymous namespace to define constants / functions that shall not be exported from this module | ||
| constexpr const int XLMaxNamespacedNameLen = 100; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #ifdef OPENXLSX_CMAKE | ||
| #include "OpenXLSX-Exports.hpp" | ||
| #else | ||
| #include "swiftpm/OpenXLSX-Exports.hpp" | ||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module CxxOpenXLSX { | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Clang module name is prefixed as |
||
| header "OpenXLSX.hpp" | ||
| export * | ||
| requires cplusplus | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
|
|
||
| #ifndef OPENXLSX_EXPORT_H | ||
| #define OPENXLSX_EXPORT_H | ||
|
|
||
| #ifdef OPENXLSX_STATIC_DEFINE | ||
| # define OPENXLSX_EXPORT | ||
| # define OPENXLSX_HIDDEN | ||
| #else | ||
| # ifndef OPENXLSX_EXPORT | ||
| # ifdef OpenXLSX_EXPORTS | ||
| /* We are building this library */ | ||
| # define OPENXLSX_EXPORT | ||
| # else | ||
| /* We are using this library */ | ||
| # define OPENXLSX_EXPORT | ||
| # endif | ||
| # endif | ||
|
|
||
| # ifndef OPENXLSX_HIDDEN | ||
| # define OPENXLSX_HIDDEN | ||
| # endif | ||
| #endif | ||
|
|
||
| #ifndef OPENXLSX_DEPRECATED | ||
| # define OPENXLSX_DEPRECATED __attribute__ ((__deprecated__)) | ||
| #endif | ||
|
|
||
| #ifndef OPENXLSX_DEPRECATED_EXPORT | ||
| # define OPENXLSX_DEPRECATED_EXPORT OPENXLSX_EXPORT OPENXLSX_DEPRECATED | ||
| #endif | ||
|
|
||
| #ifndef OPENXLSX_DEPRECATED_NO_EXPORT | ||
| # define OPENXLSX_DEPRECATED_NO_EXPORT OPENXLSX_HIDDEN OPENXLSX_DEPRECATED | ||
| #endif | ||
|
|
||
| #if 0 /* DEFINE_NO_DEPRECATED */ | ||
| # ifndef OPENXLSX_NO_DEPRECATED | ||
| # define OPENXLSX_NO_DEPRECATED | ||
| # endif | ||
| #endif | ||
|
|
||
| #endif /* OPENXLSX_EXPORT_H */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To address (4), I added a flag to indicate that the build was performed using CMake.