mirror of
https://github.com/QtExcel/QXlsx.git
synced 2025-01-30 05:02:52 +08:00
Fix shared builds
This commit is contained in:
parent
d2198a84ef
commit
6d1667f55c
@ -148,6 +148,9 @@ add_library(QXlsx
|
||||
)
|
||||
|
||||
add_library(QXlsx::QXlsx ALIAS QXlsx)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(QXlsx PUBLIC QXlsx_SHAREDLIB)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
|
@ -15,7 +15,7 @@ CONFIG += c++11
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# For DLL visibility
|
||||
#DEFINES += QXlsx_EXPORTS
|
||||
#DEFINES += QXlsx_SHAREDLIB QXlsx_EXPORTS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
|
@ -16,10 +16,12 @@
|
||||
#include <QStringList>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#if defined(QXlsx_SHAREDLIB)
|
||||
#if defined(QXlsx_EXPORTS)
|
||||
# define QXLSX_EXPORT Q_DECL_EXPORT
|
||||
#elif defined (QXlsx_IMPORTS)
|
||||
#else
|
||||
# define QXLSX_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
#else
|
||||
# define QXLSX_EXPORT
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user