add_custom_command(OUTPUT generalsettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py --group=General --output=generalsettingswidget.cpp ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg) add_custom_command(OUTPUT appearancesettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py --group=Appearance --output=appearancesettingswidget.cpp ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg) add_custom_command(OUTPUT networksettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py --group=Network --output=networksettingswidget.cpp ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg) add_custom_command(OUTPUT shortcutssettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py --group=Shortcuts --output=shortcutssettingswidget.cpp ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg) add_library(settings STATIC ${PROJECT_SOURCE_DIR}/include/rsettings.hpp settings.cpp settings.hpp settingsdialog.cpp settingsdialog.h settingsdialog.ui settingswidgets.hpp settingswidget.cpp helpers.hpp generalsettingswidget.cpp appearancesettingswidget.cpp networksettingswidget.cpp shortcutssettingswidget.cpp ) target_link_libraries(settings PUBLIC Qt6::Widgets) IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug") add_executable(test_settingsdialog test/test_settingsdialog.cpp test/settings_mock.hpp) target_link_libraries(test_settingsdialog GTest::gmock settings) add_executable(test_settings test/test_settings.cpp test/test_settings.qrc test/settings_mock.hpp) target_link_libraries(test_settings PRIVATE GTest::gtest GTest::gmock settings) gtest_discover_tests(test_settings EXTRA_ARGS rekonqrc) endif()