@@ -69,9 +69,6 @@ add_custom_command(
6969)
7070set_source_files_properties (${GENERATED_SRC_WIZARD} /configdoc.cpp PROPERTIES GENERATED 1)
7171
72- # Localized config.xml files are manually placed in ${PROJECT_SOURCE_DIR}/src/translations
73- # They are referenced directly in doxywizard.qrc
74-
7572set (LEX_FILES config_doxyw)
7673
7774if (NOT depfile_supported)
@@ -143,58 +140,10 @@ inputbool.h
143140inputstring.h
144141inputstrlist.h
145142wizard.h
146- translationmanager.h
147143)
148144
149145qt_add_resources (doxywizard_RESOURCES_RCC doxywizard.qrc )
150146
151- # Generate localized config.qrc
152- set (CONFIG_QRC_CONTENT "<!DOCTYPE RCC>\n <RCC version=\" 1.0\" >\n <qresource prefix=\" /config\" >\n " )
153- string (APPEND CONFIG_QRC_CONTENT " <file alias=\" config.xml\" >${PROJECT_SOURCE_DIR } /src/config.xml</file>\n " )
154- file (GLOB LANG_CONFIG_FILES CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR } /src/translations/config_*.xml" )
155- foreach (lang_file ${LANG_CONFIG_FILES} )
156- get_filename_component (lang_name "${lang_file} " NAME ) # e.g. config_zh_CN.xml
157- string (APPEND CONFIG_QRC_CONTENT " <file alias=\" ${lang_name} \" >${lang_file} </file>\n " )
158- endforeach ()
159- string (APPEND CONFIG_QRC_CONTENT "</qresource>\n </RCC>\n " )
160-
161- file (WRITE ${CMAKE_CURRENT_BINARY_DIR } /config.qrc "${CONFIG_QRC_CONTENT} " )
162-
163- qt_add_resources (doxywizard_CONFIG_RESOURCES ${CMAKE_CURRENT_BINARY_DIR } /config.qrc )
164-
165- set (TRANSLATIONS_DIR ${CMAKE_CURRENT_SOURCE_DIR } /translations)
166-
167- file (GLOB DOXYWIZARD_TRANSLATION_FILES CONFIGURE_DEPENDS "${TRANSLATIONS_DIR} /doxywizard_*.ts" )
168-
169- set (ALL_TRANSLATION_FILES
170- ${DOXYWIZARD_TRANSLATION_FILES}
171- )
172-
173- find_package (Qt6LinguistTools QUIET )
174- if (Qt6LinguistTools_FOUND)
175- set_source_files_properties (${ALL_TRANSLATION_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR } )
176- qt6_add_translation (doxywizard_QM_FILES ${ALL_TRANSLATION_FILES} )
177- else ()
178- find_package (Qt5LinguistTools QUIET )
179- if (Qt5LinguistTools_FOUND)
180- set_source_files_properties (${ALL_TRANSLATION_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR } )
181- qt5_add_translation (doxywizard_QM_FILES ${ALL_TRANSLATION_FILES} )
182- else ()
183- message (STATUS "Qt Linguist tools not found, translation files will not be compiled" )
184- endif ()
185- endif ()
186-
187- set (TRANSLATIONS_QRC_CONTENT "<!DOCTYPE RCC>\n <RCC version=\" 1.0\" >\n <qresource prefix=\" /translations\" >\n " )
188- foreach (qm_file ${doxywizard_QM_FILES} )
189- get_filename_component (qm_name ${qm_file} NAME )
190- string (APPEND TRANSLATIONS_QRC_CONTENT " <file>${qm_name} </file>\n " )
191- endforeach ()
192- string (APPEND TRANSLATIONS_QRC_CONTENT " </qresource>\n </RCC>\n " )
193-
194- file (WRITE ${CMAKE_CURRENT_BINARY_DIR } /translations.qrc "${TRANSLATIONS_QRC_CONTENT} " )
195-
196- qt_add_resources (doxywizard_TRANSLATION_RESOURCES ${CMAKE_CURRENT_BINARY_DIR } /translations.qrc )
197-
198147add_executable (doxywizard WIN32
199148config_msg.cpp
200149doxywizard.cpp
@@ -204,16 +153,12 @@ inputbool.cpp
204153inputstring.cpp
205154inputint.cpp
206155inputstrlist.cpp
207- translationmanager.cpp
208156${GENERATED_SRC_WIZARD} /settings.h
209157${GENERATED_SRC_WIZARD} /config_doxyw.cpp
210158${GENERATED_SRC_WIZARD} /config_doxyw.l.h
211159${GENERATED_SRC_WIZARD} /configdoc.cpp
212160${doxywizard_MOC}
213161${doxywizard_RESOURCES_RCC}
214- ${doxywizard_CONFIG_RESOURCES}
215- ${doxywizard_TRANSLATION_RESOURCES}
216- ${doxywizard_QM_FILES}
217162${PROJECT_SOURCE_DIR } /templates/icon/doxygen.rc
218163)
219164
@@ -226,9 +171,6 @@ else()
226171apply_editbin (doxywizard windows )
227172endif ()
228173
229- include (ApplyManifest )
230- apply_manifest (doxywizard )
231-
232174if (Qt5Core_FOUND)
233175 target_link_libraries (doxywizard Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml doxygen_version )
234176elseif (Qt6Core_FOUND)
0 commit comments