widgets/CMakeLists.txt

Sun, 03 Jul 2022 22:24:12 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 03 Jul 2022 22:24:12 +0300
changeset 326
65dbfcb859a7
parent 268
fb319526ba6c
child 348
98776f54a8d0
permissions
-rw-r--r--

Add missing 0 BFC INVERTNEXT when writing out subfile references

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