simplify custom widgets CMakeLists.txt

This commit is contained in:
Denis Rouzaud 2017-07-06 10:50:38 +02:00
parent 2745797fcd
commit df209774d4

View File

@ -74,31 +74,6 @@ ELSE(MSVC)
SET_SOURCE_FILES_PROPERTIES(${QGIS_CUSTOMWIDGETS_MOC_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations" )
ENDIF(MSVC)
SET(QGIS_CUSTOMWIDGETS_HDRS
qgiscustomwidgets.h
qgscollapsiblegroupboxplugin.h
qgscolorbuttonplugin.h
qgsdatetimeeditplugin.h
qgsdockwidgetplugin.h
qgsdoublespinboxplugin.h
qgsexpressionbuilderwidgetplugin.h
qgsextentgroupboxplugin.h
qgsexternalresourcewidgetplugin.h
qgsfieldcomboboxplugin.h
qgsfieldexpressionwidgetplugin.h
qgsfilewidgetplugin.h
qgsfilterlineeditplugin.h
qgsmaplayercomboboxplugin.h
qgsopacitywidgetplugin.h
qgsprojectionselectionwidgetplugin.h
qgspropertyoverridebuttonplugin.h
qgsrasterbandcomboboxplugin.h
qgsrelationeditorwidgetplugin.h
qgsrelationreferencewidgetplugin.h
qgsscalerangewidgetplugin.h
qgsscalewidgetplugin.h
qgsspinboxplugin.h
)
# left commented as there is no UI file yet
# SET(QGIS_CUSTOMWIDGETS_UI_HDRS
@ -138,7 +113,7 @@ QT5_WRAP_CPP(QGIS_CUSTOMWIDGETS_MOC_SRCS ${QGIS_CUSTOMWIDGETS_MOC_HDRS})
SET(IMAGE_RCCS ../../images/images.qrc)
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})
ADD_LIBRARY(qgis_customwidgets SHARED ${QGIS_CUSTOMWIDGETS_SRCS} ${QGIS_CUSTOMWIDGETS_MOC_SRCS} ${QGIS_CUSTOMWIDGETS_MOC_HDRS} ${IMAGE_RCC_SRCS})
SET_TARGET_PROPERTIES(qgis_customwidgets PROPERTIES
VERSION ${COMPLETE_VERSION}
@ -156,7 +131,7 @@ GENERATE_EXPORT_HEADER(
EXPORT_FILE_NAME qgis_customwidgets.h
)
SET(QGIS_CUSTOMWIDGETS_HDRS ${QGIS_CUSTOMWIDGETS_HDRS} ${CMAKE_CURRENT_BINARY_DIR}/qgis_customwidgets.h)
SET(QGIS_CUSTOMWIDGETS_INSTALL_HDRS ${QGIS_CUSTOMWIDGETS_MOC_HDRS} ${CMAKE_CURRENT_BINARY_DIR}/qgis_customwidgets.h)
# install
INSTALL(TARGETS qgis_customwidgets
@ -165,4 +140,4 @@ INSTALL(TARGETS qgis_customwidgets
)
# TODO: apple
INSTALL(FILES ${QGIS_CUSTOMWIDGETS_HDRS} DESTINATION ${QGIS_INCLUDE_DIR})
INSTALL(FILES ${QGIS_CUSTOMWIDGETS_INSTALL_HDRS} DESTINATION ${QGIS_INCLUDE_DIR})