1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-25 05:47:45 +00:00

Use KConfig cmake macro for kcfgc generation

This commit is contained in:
Joshua Goins 2024-08-22 21:32:56 -04:00
parent f136f6475c
commit 8b90f114d5
4 changed files with 6 additions and 31 deletions

View file

@ -92,7 +92,9 @@ target_link_libraries(astra_static PUBLIC
QCoro::Core
QCoro::Network
QCoro::Qml)
kconfig_add_kcfg_files(astra_static GENERATE_MOC config.kcfgc accountconfig.kcfgc profileconfig.kcfgc)
kconfig_target_kcfg_file(astra_static FILE config.kcfg CLASS_NAME Config MUTATORS GENERATE_PROPERTIES GENERATE_MOC DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR)
kconfig_target_kcfg_file(astra_static FILE accountconfig.kcfg CLASS_NAME AccountConfig MUTATORS GENERATE_PROPERTIES GENERATE_MOC DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR)
kconfig_target_kcfg_file(astra_static FILE profileconfig.kcfg CLASS_NAME ProfileConfig MUTATORS GENERATE_PROPERTIES GENERATE_MOC DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR)
target_include_directories(astra_static PUBLIC include ${CMAKE_BINARY_DIR})
if (NOT MSVC)

View file

@ -1,9 +0,0 @@
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
# SPDX-License-Identifier: CC0-1.0
File=accountconfig.kcfg
ClassName=AccountConfig
Mutators=true
DefaultValueGetters=true
GenerateProperties=true
ParentInConstructor=true
Singleton=false

View file

@ -1,9 +0,0 @@
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
# SPDX-License-Identifier: CC0-1.0
File=config.kcfg
ClassName=Config
Mutators=true
DefaultValueGetters=true
GenerateProperties=true
ParentInConstructor=false
Singleton=false

View file

@ -1,9 +0,0 @@
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
# SPDX-License-Identifier: CC0-1.0
File=profileconfig.kcfg
ClassName=ProfileConfig
Mutators=true
DefaultValueGetters=true
GenerateProperties=true
ParentInConstructor=true
Singleton=false