diff --git a/gnucash/gnucash-gresources.xml b/gnucash/gnucash-gresources.xml
index 780271d70d..e89c6fc1fd 100644
--- a/gnucash/gnucash-gresources.xml
+++ b/gnucash/gnucash-gresources.xml
@@ -27,9 +27,6 @@
ui/gnc-plugin-page-report.ui
ui/gnc-plugin-page-sx-list.ui
- ui/gnc-plugin-ofx.ui
- ui/gnc-plugin-aqbanking.ui
-
ui/gnc-plugin-qif-import.ui
ui/gnc-reconcile-window.ui
diff --git a/gnucash/import-export/aqb/CMakeLists.txt b/gnucash/import-export/aqb/CMakeLists.txt
index a275638fbd..dcc856e599 100644
--- a/gnucash/import-export/aqb/CMakeLists.txt
+++ b/gnucash/import-export/aqb/CMakeLists.txt
@@ -41,9 +41,27 @@ set (aqbanking_noinst_HEADERS
set(aqbanking_GLADE assistant-ab-initial.glade dialog-ab.glade dialog-ab-pref.glade)
+set(aqbanking_UI gnc-plugin-aqbanking.ui)
+
if(WITH_AQBANKING)
+
+ add_custom_command(
+ OUTPUT aqb-gresources.c
+ COMMAND
+ "${GLIB_COMPILE_RESOURCES_EXECUTABLE}"
+ --target=aqb-gresources.c
+ --sourcedir=${CMAKE_CURRENT_SOURCE_DIR}
+ --generate-source
+ ${CMAKE_CURRENT_SOURCE_DIR}/aqb-gresources.xml
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/aqb-gresources.xml ${aqbanking_UI}
+ WORKING_DIRECTORY
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
add_library (gncmod-aqbanking
${aqbanking_SOURCES}
+ ${CMAKE_CURRENT_BINARY_DIR}/aqb-gresources.c
${aqbanking_noinst_HEADERS}
)
diff --git a/gnucash/ui/gnc-plugin-aqbanking.ui b/gnucash/import-export/aqb/gnc-plugin-aqbanking.ui
similarity index 100%
rename from gnucash/ui/gnc-plugin-aqbanking.ui
rename to gnucash/import-export/aqb/gnc-plugin-aqbanking.ui
diff --git a/gnucash/import-export/ofx/CMakeLists.txt b/gnucash/import-export/ofx/CMakeLists.txt
index 8a9a254602..8d3fed4f32 100644
--- a/gnucash/import-export/ofx/CMakeLists.txt
+++ b/gnucash/import-export/ofx/CMakeLists.txt
@@ -15,8 +15,29 @@ set(ofx_noinst_HEADERS
gnc-plugin-ofx.h
)
+set(ofx_UI gnc-plugin-ofx.ui)
+
if (WITH_OFX)
- add_library(gncmod-ofx ${ofx_SOURCES} ${ofx_noinst_HEADERS})
+
+ add_custom_command(
+ OUTPUT ofx-gresources.c
+ COMMAND
+ "${GLIB_COMPILE_RESOURCES_EXECUTABLE}"
+ --target=ofx-gresources.c
+ --sourcedir=${CMAKE_CURRENT_SOURCE_DIR}
+ --generate-source
+ ${CMAKE_CURRENT_SOURCE_DIR}/ofx-gresources.xml
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/ofx-gresources.xml ${ofx_UI}
+ WORKING_DIRECTORY
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ add_library(gncmod-ofx
+ ${ofx_SOURCES}
+ ${CMAKE_CURRENT_BINARY_DIR}/ofx-gresources.c
+ ${ofx_noinst_HEADERS}
+ )
target_link_libraries(gncmod-ofx gnc-generic-import gnc-engine gnc-app-utils gnc-core-utils
gnc-gnome-utils gnc-gnome gnc-module ${LIBOFX_LDFLAGS})
@@ -36,5 +57,5 @@ endif()
endif()
-set_local_dist(ofx_DIST_local CMakeLists.txt ${ofx_SOURCES} ${ofx_noinst_HEADERS} )
+set_local_dist(ofx_DIST_local CMakeLists.txt ${ofx_SOURCES} ${ofx_noinst_HEADERS} ${ofx_UI})
set(ofx_DIST ${ofx_DIST_local} ${test_ofx_DIST} ${ofx_gschema_DIST} PARENT_SCOPE)
diff --git a/gnucash/ui/gnc-plugin-ofx.ui b/gnucash/import-export/ofx/gnc-plugin-ofx.ui
similarity index 100%
rename from gnucash/ui/gnc-plugin-ofx.ui
rename to gnucash/import-export/ofx/gnc-plugin-ofx.ui
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a71d9ae57c..e5293495c3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -315,6 +315,7 @@ gnucash/import-export/aqb/gnc-flicker-gui.c
gnucash/import-export/aqb/gnc-gwen-gui.c
gnucash/import-export/aqb/gncmod-aqbanking.c
gnucash/import-export/aqb/gnc-plugin-aqbanking.c
+gnucash/import-export/aqb/gnc-plugin-aqbanking.ui
gnucash/import-export/aqb/gschemas/org.gnucash.GnuCash.dialogs.flicker.gschema.xml.in
gnucash/import-export/aqb/gschemas/org.gnucash.GnuCash.dialogs.import.hbci.gschema.xml.in
gnucash/import-export/bi-import/dialog-bi-import.c
@@ -361,6 +362,7 @@ gnucash/import-export/log-replay/gnc-plugin-log-replay.c
gnucash/import-export/ofx/gncmod-ofx-import.c
gnucash/import-export/ofx/gnc-ofx-import.c
gnucash/import-export/ofx/gnc-plugin-ofx.c
+gnucash/import-export/ofx/gnc-plugin-ofx.ui
gnucash/import-export/ofx/gschemas/org.gnucash.GnuCash.dialogs.import.ofx.gschema.xml.in
gnucash/import-export/qif-imp/assistant-qif-import.c
gnucash/import-export/qif-imp/dialog-account-picker.c
@@ -508,7 +510,6 @@ gnucash/report/trep-engine.scm
gnucash/ui/gnc-embedded-register-window.ui
gnucash/ui/gnc-main-window.ui
gnucash/ui/gnc-plugin-account-tree.ui
-gnucash/ui/gnc-plugin-aqbanking.ui
gnucash/ui/gnc-plugin-basic-commands.ui
gnucash/ui/gnc-plugin-bi-import.ui
gnucash/ui/gnc-plugin-budget.ui
@@ -518,7 +519,6 @@ gnucash/ui/gnc-plugin-csv-import.ui
gnucash/ui/gnc-plugin-customer-import.ui
gnucash/ui/gnc-plugin-file-history.ui
gnucash/ui/gnc-plugin-log-replay.ui
-gnucash/ui/gnc-plugin-ofx.ui
gnucash/ui/gnc-plugin-page-account-tree.ui
gnucash/ui/gnc-plugin-page-budget.ui
gnucash/ui/gnc-plugin-page-invoice.ui