Sat, 08 Apr 2023 12:55:11 +0300
Fix BFC formatting not working due to being evaluated after comment format
268
fb319526ba6c
Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
266
diff
changeset
|
1 | set(WIDGETLIB "${TARGET_NAME}widgets" PARENT_SCOPE) |
fb319526ba6c
Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
266
diff
changeset
|
2 | set(WIDGETLIB "${TARGET_NAME}widgets") |
266
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
3 | qt_wrap_ui(WIDGETS_FORMS |
253
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
4 | vec3editor.ui |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
5 | multiplyfactordialog.ui |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
6 | matrixeditor.ui |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
7 | ) |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
8 | |
266
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
9 | add_library(${WIDGETLIB} SHARED |
256
c6f5de03dc0f
Move color button into widgets lib
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
255
diff
changeset
|
10 | colorbutton.cpp |
c6f5de03dc0f
Move color button into widgets lib
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
255
diff
changeset
|
11 | colorbutton.h |
253
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
12 | designerplugins.cpp |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
13 | designerplugins.h |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
14 | doublespinbox.cpp |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
15 | doublespinbox.h |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
16 | matrixeditor.cpp |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
17 | matrixeditor.h |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
18 | vec3editor.cpp |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
19 | vec3editor.h |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
20 | multiplyfactordialog.cpp |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
21 | multiplyfactordialog.h |
266
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
22 | ${WIDGETS_FORMS} |
253
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
23 | ) |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
24 | |
259
c27612f0eac0
- Made it build under Qt6
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
256
diff
changeset
|
25 | get_target_property(UIPLUGIN_INCLUDES QtUiPlugin INTERFACE_INCLUDE_DIRECTORIES) |
266
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
26 | target_include_directories(${WIDGETLIB} PUBLIC "${UIPLUGIN_INCLUDES}") |
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
27 | target_include_directories(${WIDGETLIB} PUBLIC "${CMAKE_SOURCE_DIR}") |
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
28 | target_include_directories(${WIDGETLIB} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}") |
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
29 | target_link_libraries(${WIDGETLIB} Qt::Widgets) |
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
30 | set_target_properties(${WIDGETLIB} PROPERTIES AUTOMOC 1) |
253
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
31 | |
259
c27612f0eac0
- Made it build under Qt6
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
256
diff
changeset
|
32 | get_target_property(QT_QMAKE_EXECUTABLE Qt::qmake LOCATION) |
253
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
33 | execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
34 | OUTPUT_VARIABLE QT_INSTALL_PLUGINS OUTPUT_STRIP_TRAILING_WHITESPACE |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
35 | ) |
266
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
36 | install(TARGETS ${WIDGETLIB} LIBRARY DESTINATION lib) |
2800a15e2a2f
use project name more in cmakelists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
264
diff
changeset
|
37 | install(TARGETS ${WIDGETLIB} |
253
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
38 | LIBRARY DESTINATION ${QT_INSTALL_PLUGINS}/designer |
8b994c917f69
Make LDForge widgets visible in Qt Designer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
39 | ) |