widgets/CMakeLists.txt

Sun, 09 Apr 2023 12:23:32 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 09 Apr 2023 12:23:32 +0300
changeset 360
41b38b9e05a2
parent 348
98776f54a8d0
permissions
-rw-r--r--

`PartRenderer::renderVao` no longer throws if bad array class is given, this is now checked on compile time

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
	coloredit.cpp
	coloredit.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