3 Commits

Author SHA1 Message Date
nou 2107d68e71 Add missing PUBLIC keyword and change LIBXISF_STATIC_LIB define 2023-02-10 13:44:27 +01:00
nou 2e8bbf6e30 Add ability to build static lib 2023-02-10 09:10:31 +01:00
nou a0968bba3a Fix error in debian/control 2023-02-10 07:56:16 +01:00
4 changed files with 17 additions and 7 deletions
+8 -2
View File
@@ -12,7 +12,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
add_library(XISF SHARED option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
add_library(XISF
libXISF_global.h libXISF_global.h
libxisf.cpp libxisf.cpp
libxisf.h libxisf.h
@@ -26,7 +28,11 @@ set_target_properties(XISF PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PRO
target_link_libraries(XISF PUBLIC Qt${QT_VERSION_MAJOR}::Core) target_link_libraries(XISF PUBLIC Qt${QT_VERSION_MAJOR}::Core)
target_compile_definitions(XISF PRIVATE LIBXISF_LIBRARY) if(BUILD_SHARED_LIBS)
target_compile_definitions(XISF PRIVATE LIBXISF_LIBRARY)
else(BUILD_SHARED_LIBS)
target_compile_definitions(XISF PUBLIC LIBXISF_STATIC_LIB)
endif(BUILD_SHARED_LIBS)
set(XISF_PUBLIC_HEADERS libxisf.h libXISF_global.h) set(XISF_PUBLIC_HEADERS libxisf.h libXISF_global.h)
+1 -1
View File
@@ -1,4 +1,4 @@
libxisf (0.1.2-ubuntu1) UNRELEASED; urgency=medium libxisf (0.1.2-ubuntu1) focal; urgency=medium
* Add qtbase5-dev as dependency to libxisf-dev * Add qtbase5-dev as dependency to libxisf-dev
+1 -1
View File
@@ -14,7 +14,7 @@ Package: libxisf-dev
Section: libdevel Section: libdevel
Architecture: any Architecture: any
Multi-Arch: same Multi-Arch: same
Depends: libxisf qtbase5-dev (= ${binary:Version}), ${misc:Depends} Depends: libxisf (= ${binary:Version}), ${misc:Depends}, qtbase5-dev
Description: Library to load and save XISF images Description: Library to load and save XISF images
Native format of PixInsight astroprocessing suite Native format of PixInsight astroprocessing suite
+6 -2
View File
@@ -21,10 +21,14 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#if defined(LIBXISF_LIBRARY) #ifdef LIBXISF_STATIC_LIB
# define LIBXISF_EXPORT Q_DECL_EXPORT # define LIBXISF_EXPORT
#else #else
# if defined(LIBXISF_LIBRARY)
# define LIBXISF_EXPORT Q_DECL_EXPORT
# else
# define LIBXISF_EXPORT Q_DECL_IMPORT # define LIBXISF_EXPORT Q_DECL_IMPORT
# endif
#endif #endif
#endif // LIBXISF_GLOBAL_H #endif // LIBXISF_GLOBAL_H