File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,16 +60,6 @@ if (${QT_VERSION} VERSION_LESS 5.11.0)
6060 message (FATAL_ERROR "Requires qt version >= 5.11.0, Your current version is ${QT_VERSION} " )
6161endif ()
6262
63- if (${QT_VERSION_MAJOR} EQUAL 6)
64- qt_add_resources (RESOURCES ./resources/resources.qrc )
65- else ()
66- qt5_add_resources (RESOURCES ./resources/resources.qrc )
67- endif ()
68-
69- # Unfortunately, as we have a split include/src, AUTOMOC doesn't work.
70- # We'll have to manually specify some files
71- set (CMAKE_AUTOMOC ON )
72-
7363set (CPP_SOURCE_FILES
7464 src/AbstractGraphModel.cpp
7565 src/AbstractNodeGeometry.cpp
@@ -95,6 +85,7 @@ set(CPP_SOURCE_FILES
9585 src/StyleCollection.cpp
9686 src/UndoCommands.cpp
9787 src/locateNode.cpp
88+ resources/resources.qrc
9889)
9990
10091set (HPP_HEADER_FILES
@@ -141,7 +132,6 @@ set(HPP_HEADER_FILES
141132add_library (QtNodes
142133 ${CPP_SOURCE_FILES}
143134 ${HPP_HEADER_FILES}
144- ${RESOURCES}
145135)
146136
147137add_library (QtNodes::QtNodes ALIAS QtNodes )
@@ -204,24 +194,8 @@ set_target_properties(QtNodes
204194######
205195# Moc
206196##
197+ set_target_properties (QtNodes PROPERTIES AUTOMOC ON AUTORCC ON )
207198
208- file (GLOB_RECURSE HEADERS_TO_MOC include /QtNodes/internal/*.hpp )
209-
210- if (${QT_VERSION_MAJOR} EQUAL 6)
211- qt_wrap_cpp (nodes_moc
212- ${HEADERS_TO_MOC}
213- TARGET QtNodes
214- OPTIONS --no-notes # Don't display a note for the headers which don't produce a moc_*.cpp
215- )
216- else ()
217- qt5_wrap_cpp (nodes_moc
218- ${HEADERS_TO_MOC}
219- TARGET QtNodes
220- OPTIONS --no-notes # Don't display a note for the headers which don't produce a moc_*.cpp
221- )
222- endif ()
223-
224- target_sources (QtNodes PRIVATE ${nodes_moc} )
225199
226200###########
227201# Examples
You can’t perform that action at this time.
0 commit comments