Add missing PUBLIC keyword and change LIBXISF_STATIC_LIB define

This commit is contained in:
2023-02-10 13:34:50 +01:00
parent 2e8bbf6e30
commit 2107d68e71
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -30,7 +30,8 @@ target_link_libraries(XISF PUBLIC Qt${QT_VERSION_MAJOR}::Core)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
target_compile_definitions(XISF PRIVATE LIBXISF_LIBRARY) target_compile_definitions(XISF PRIVATE LIBXISF_LIBRARY)
target_compile_definitions(XISF LIBXISF_SHARED_LIB) else(BUILD_SHARED_LIBS)
target_compile_definitions(XISF PUBLIC LIBXISF_STATIC_LIB)
endif(BUILD_SHARED_LIBS) endif(BUILD_SHARED_LIBS)
set(XISF_PUBLIC_HEADERS libxisf.h libXISF_global.h) set(XISF_PUBLIC_HEADERS libxisf.h libXISF_global.h)
+3 -3
View File
@@ -21,14 +21,14 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#ifdef LIBXISF_SHARED_LIB #ifdef LIBXISF_STATIC_LIB
# define LIBXISF_EXPORT
#else
# if defined(LIBXISF_LIBRARY) # if defined(LIBXISF_LIBRARY)
# define LIBXISF_EXPORT Q_DECL_EXPORT # define LIBXISF_EXPORT Q_DECL_EXPORT
# else # else
# define LIBXISF_EXPORT Q_DECL_IMPORT # define LIBXISF_EXPORT Q_DECL_IMPORT
# endif # endif
#else
# define LIBXISF_EXPORT
#endif #endif
#endif // LIBXISF_GLOBAL_H #endif // LIBXISF_GLOBAL_H