include_directories(
	${CMAKE_SOURCE_DIR}
	${CMAKE_SOURCE_DIR}/scribus
)

set(MESHDISTORTION_PLUGIN_UI_SRC
	meshdistortiondialog.ui
)

set(MESHDISTORTION_PLUGIN_MOC_CLASSES
	meshdistortiondialog.h
	meshdistortion.h
)

set(MESHDISTORTION_PLUGIN_SOURCES
	meshdistortiondialog.cpp
	meshdistortion.cpp
)

set(SCRIBUS_MESHDISTORTION_PLUGIN "meshdistortion")

QT5_WRAP_UI(MESHDISTORTION_PLUGIN_UI_SOURCES ${MESHDISTORTION_PLUGIN_UI_SRC} )
QT5_WRAP_CPP(MESHDISTORTION_PLUGIN_MOC_SOURCES ${MESHDISTORTION_PLUGIN_MOC_CLASSES})

add_library(${SCRIBUS_MESHDISTORTION_PLUGIN} MODULE ${MESHDISTORTION_PLUGIN_SOURCES} ${MESHDISTORTION_PLUGIN_MOC_SOURCES} ${MESHDISTORTION_PLUGIN_UI_CPP} ${MESHDISTORTION_PLUGIN_UI_SOURCES})

target_link_libraries(${SCRIBUS_MESHDISTORTION_PLUGIN} ${PLUGIN_LIBRARIES} ${SCRIBUS_2GEOM_LIB})
install(TARGETS ${SCRIBUS_MESHDISTORTION_PLUGIN}
	LIBRARY
	DESTINATION ${PLUGINDIR}
	PERMISSIONS ${PLUGIN_PERMISSIONS}
)
