mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Add qgis_customwidgets with CUSTOMWIDGETS_EXPORT macro
This commit is contained in:
parent
1693140b1c
commit
2f35e16e2b
@ -581,8 +581,6 @@ ELSE (WIN32)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_DEFINITIONS("-DCUSTOMWIDGETS_EXPORT=${DLLIMPORT}")
|
||||
|
||||
SET(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
INCLUDE(GenerateExportHeader)
|
||||
|
||||
|
@ -7,10 +7,6 @@ FIND_PACKAGE(Qt5Designer REQUIRED)
|
||||
|
||||
SET(QT_USE_QTDESIGNER ON)
|
||||
|
||||
|
||||
REMOVE_DEFINITIONS("-DCUSTOMWIDGETS_EXPORT=${DLLIMPORT}")
|
||||
ADD_DEFINITIONS("\"-DCUSTOMWIDGETS_EXPORT=${DLLEXPORT}\"")
|
||||
|
||||
########################################################
|
||||
# Files
|
||||
|
||||
@ -107,6 +103,7 @@ INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../gui/editorwidgets/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../gui/editorwidgets/core
|
||||
${CMAKE_BINARY_DIR}/src/core
|
||||
${CMAKE_BINARY_DIR}/src/customwidgets
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/
|
||||
)
|
||||
INCLUDE_DIRECTORIES(SYSTEM
|
||||
@ -126,9 +123,6 @@ QT5_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})
|
||||
|
||||
ADD_LIBRARY(qgis_customwidgets SHARED ${QGIS_CUSTOMWIDGETS_SRCS} ${QGIS_CUSTOMWIDGETS_MOC_SRCS} ${QGIS_CUSTOMWIDGETS_HDRS} ${IMAGE_RCC_SRCS})
|
||||
|
||||
# TODO: apple
|
||||
INSTALL(FILES ${QGIS_CUSTOMWIDGETS_HDRS} DESTINATION ${QGIS_INCLUDE_DIR})
|
||||
|
||||
SET_TARGET_PROPERTIES(qgis_customwidgets PROPERTIES
|
||||
VERSION ${COMPLETE_VERSION}
|
||||
SOVERSION ${COMPLETE_VERSION}
|
||||
@ -139,8 +133,19 @@ ADD_DEPENDENCIES(qgis_customwidgets ui)
|
||||
|
||||
TARGET_LINK_LIBRARIES(qgis_customwidgets qgis_gui)
|
||||
|
||||
GENERATE_EXPORT_HEADER(
|
||||
qgis_customwidgets
|
||||
BASE_NAME CUSTOMWIDGETS
|
||||
EXPORT_FILE_NAME qgis_customwidgets.h
|
||||
)
|
||||
|
||||
SET(QGIS_CUSTOMWIDGETS_HDRS ${QGIS_CUSTOMWIDGETS_HDRS} ${PROJECT_BINARY_DIR}/qgis_customwidgets.h)
|
||||
|
||||
# install
|
||||
INSTALL(TARGETS qgis_customwidgets
|
||||
RUNTIME DESTINATION ${QT_PLUGINS_DIR}/designer
|
||||
LIBRARY DESTINATION ${QT_PLUGINS_DIR}/designer
|
||||
)
|
||||
|
||||
# TODO: apple
|
||||
INSTALL(FILES ${QGIS_CUSTOMWIDGETS_HDRS} DESTINATION ${QGIS_INCLUDE_DIR})
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
class CUSTOMWIDGETS_EXPORT QgsCollapsibleGroupBoxPlugin : public QObject, public QDesignerCustomWidgetInterface
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
class CUSTOMWIDGETS_EXPORT QgsDockWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user