@@ -124,6 +124,7 @@ set(LIBS ${Boost_LIBRARIES})
124124############# Qt
125125find_package (Qt6 COMPONENTS Core Widgets Gui Xml OpenGL OpenGLWidgets Concurrent LinguistTools REQUIRED )
126126set (LIBS ${LIBS} Qt6::Widgets Qt6::Gui Qt6::Core Qt6::Xml Qt6::OpenGL Qt6::OpenGLWidgets Qt6::Concurrent)
127+ qt_standard_project_setup ()
127128
128129
129130############################################################################
@@ -226,14 +227,14 @@ endif ()
226227#
227228# Link DegateCore
228229#
229- add_library (DegateCore STATIC ${SRC_FILES} res/resources.qrc res/qdarkstyle/style.qrc ${CMAKE_BINARY_DIR } /translations.qrc ${TRANSLATION_FILES} ${QM_FILES} "Degate version" )
230- target_link_libraries (DegateCore ${LIBS} )
230+ qt_add_library (DegateCore STATIC ${SRC_FILES} res/resources.qrc res/qdarkstyle/style.qrc ${CMAKE_BINARY_DIR } /translations.qrc ${TRANSLATION_FILES} ${QM_FILES} "Degate version" )
231+ target_link_libraries (DegateCore PRIVATE ${LIBS} )
231232
232233#
233234# Link main (Degate)
234235#
235- add_executable (Degate "src/Main.cc" res/resources.qrc res/qdarkstyle/style.qrc ${CMAKE_BINARY_DIR } /translations.qrc ${TRANSLATION_FILES} ${QM_FILES} "res/resource.rc" )
236- target_link_libraries (Degate ${LIBS} DegateCore )
236+ qt_add_executable (Degate "src/Main.cc" res/resources.qrc res/qdarkstyle/style.qrc ${CMAKE_BINARY_DIR } /translations.qrc ${TRANSLATION_FILES} ${QM_FILES} "res/resource.rc" )
237+ target_link_libraries (Degate PRIVATE ${LIBS} DegateCore )
237238
238239#
239240# Activate bundle for MacOS.
@@ -245,6 +246,16 @@ set_target_properties(Degate PROPERTIES MACOSX_BUNDLE TRUE)
245246#
246247install (TARGETS Degate DESTINATION out/bin)
247248
249+ #
250+ # Automatic Qt deploy
251+ #
252+ qt_generate_deploy_app_script (
253+ TARGET Degate
254+ OUTPUT_SCRIPT deploy_script
255+ NO_UNSUPPORTED_PLATFORM_ERROR
256+ )
257+ install (SCRIPT ${deploy_script} )
258+
248259#
249260# Output specifications
250261#
0 commit comments