widgets/CMakeLists.txt

Fri, 01 Jul 2022 16:46:43 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Fri, 01 Jul 2022 16:46:43 +0300
changeset 312
2637134bc37c
parent 268
fb319526ba6c
child 348
98776f54a8d0
permissions
-rw-r--r--

Fix right click to delete not really working properly
Instead of removing the point that had been added, it would remove
the point that is being drawn, which would cause it to overwrite the
previous point using the new point, causing a bit of a delay

set(WIDGETLIB "${TARGET_NAME}widgets" PARENT_SCOPE)
set(WIDGETLIB "${TARGET_NAME}widgets")
qt_wrap_ui(WIDGETS_FORMS
	vec3editor.ui
	multiplyfactordialog.ui
	matrixeditor.ui
)

add_library(${WIDGETLIB} SHARED
	colorbutton.cpp
	colorbutton.h
	designerplugins.cpp
	designerplugins.h
	doublespinbox.cpp
	doublespinbox.h
	matrixeditor.cpp
	matrixeditor.h
	vec3editor.cpp
	vec3editor.h
	multiplyfactordialog.cpp
	multiplyfactordialog.h
	${WIDGETS_FORMS}
)

get_target_property(UIPLUGIN_INCLUDES QtUiPlugin INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(${WIDGETLIB} PUBLIC "${UIPLUGIN_INCLUDES}")
target_include_directories(${WIDGETLIB} PUBLIC "${CMAKE_SOURCE_DIR}")
target_include_directories(${WIDGETLIB} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(${WIDGETLIB} Qt::Widgets)
set_target_properties(${WIDGETLIB} PROPERTIES AUTOMOC 1)

get_target_property(QT_QMAKE_EXECUTABLE Qt::qmake LOCATION)
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS
	OUTPUT_VARIABLE QT_INSTALL_PLUGINS OUTPUT_STRIP_TRAILING_WHITESPACE
)
install(TARGETS ${WIDGETLIB} LIBRARY DESTINATION lib)
install(TARGETS ${WIDGETLIB}
	LIBRARY DESTINATION ${QT_INSTALL_PLUGINS}/designer
)

mercurial