diff -r da4876bfd822 -r 8b994c917f69 widgets/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/CMakeLists.txt Wed Jun 22 21:42:10 2022 +0300 @@ -0,0 +1,35 @@ +find_package(Qt5 REQUIRED COMPONENTS UiPlugin) +qt5_wrap_ui(LDFORGEWIDGETS_FORMS + vec3editor.ui + multiplyfactordialog.ui + matrixeditor.ui +) + +add_library(ldforgewidgets SHARED + designerplugins.cpp + designerplugins.h + doublespinbox.cpp + doublespinbox.h + matrixeditor.cpp + matrixeditor.h + vec3editor.cpp + vec3editor.h + multiplyfactordialog.cpp + multiplyfactordialog.h + ${LDFORGEWIDGETS_FORMS} +) + +get_target_property(Qt5UiPlugin_INCLUDES Qt5::UiPlugin INTERFACE_INCLUDE_DIRECTORIES) +target_include_directories(ldforgewidgets PUBLIC ${Qt5UiPlugin_INCLUDES}) +target_include_directories(ldforgewidgets PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") +target_include_directories(ldforgewidgets PUBLIC "${CMAKE_CURRENT_BINARY_DIR}") +target_link_libraries(ldforgewidgets Qt5::Widgets) + +get_target_property(QT_QMAKE_EXECUTABLE Qt5::qmake LOCATION) +execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS + OUTPUT_VARIABLE QT_INSTALL_PLUGINS OUTPUT_STRIP_TRAILING_WHITESPACE +) +install(TARGETS ldforgewidgets LIBRARY DESTINATION lib) +install(TARGETS ldforgewidgets + LIBRARY DESTINATION ${QT_INSTALL_PLUGINS}/designer +)