diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index 7690568..74184bb 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -40,7 +40,9 @@ if (KF5Kirigami2_FOUND) add_definitions(-DKIRIGAMI2) endif() -ecm_create_qm_loader(Demo_QM_LOADER Demo_qt.pot) +if (ECM_FOUND) + ecm_create_qm_loader(Demo_QM_LOADER rqbgdemo_qt) +endif() set(Demo_SRCS src/main.cpp src/Bindings.cpp src/SortedModel.cpp resource_file.qrc ${Demo_QM_LOADER}) diff --git a/demo/Messages.sh b/demo/Messages.sh new file mode 100755 index 0000000..71b5be6 --- /dev/null +++ b/demo/Messages.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Extract strings from all source files. +# EXTRACT_TR_STRINGS extracts strings with lupdate and convert them to .pot with +# lconvert. +$EXTRACT_TR_STRINGS `find . -name \*.cpp -o -name \*.h -o -name \*.ui -o -name \*.qml` -o $podir/rqbgdemo_qt.pot diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bc6d40f..77570b8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,12 @@ +if (ECM_FOUND) + ecm_create_qm_loader(rust_qt_binding_generator_QM_LOADER rust_qt_binding_generator_qt) +endif() + add_executable(rust_qt_binding_generator main.cpp - parseJson.cpp cpp.cpp rust.cpp helper.cpp) + parseJson.cpp cpp.cpp rust.cpp helper.cpp + ${rust_qt_binding_generator_QM_LOADER} +) target_link_libraries(rust_qt_binding_generator Qt5::Core ) diff --git a/Messages.sh b/src/Messages.sh similarity index 56% rename from Messages.sh rename to src/Messages.sh index 39fd404..4a918f4 100755 --- a/Messages.sh +++ b/src/Messages.sh @@ -3,4 +3,4 @@ # Extract strings from all source files. # EXTRACT_TR_STRINGS extracts strings with lupdate and convert them to .pot with # lconvert. -$EXTRACT_TR_STRINGS `find demo -name \*.cpp -o -name \*.h -o -name \*.ui -o -name \*.qml` -o $podir/Demo_qt.pot +$EXTRACT_TR_STRINGS `find . -name \*.cpp -o -name \*.h` -o $podir/rust_qt_binding_generator_qt.pot