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