aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/VendorConfig.cmake12
-rw-r--r--lib/configuration/CMakeLists.txt5
-rw-r--r--linux/makepkg/PKGBUILD8
-rw-r--r--src/CMakeLists.txt2
4 files changed, 19 insertions, 8 deletions
diff --git a/cmake/VendorConfig.cmake b/cmake/VendorConfig.cmake
index b424378..0e6891c 100644
--- a/cmake/VendorConfig.cmake
+++ b/cmake/VendorConfig.cmake
@@ -7,11 +7,6 @@ if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}/.config")
endif()
# there is a .config in ${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}/.config
-add_custom_command(OUTPUT "${PROJECT_BINARY_DIR}/include/config.h"
- COMMAND ${CMAKE_COMMAND} -E env "srctree=${PROJECT_SOURCE_DIR}"
- ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tools/Kconfiglib/genconfig.py" "--header-path=${PROJECT_BINARY_DIR}/include/config.h" "${PROJECT_SOURCE_DIR}/src/Kconfig"
- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}")
-
function(config KEY KCONFIG)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tools/config.py" "--kconfig=${PROJECT_SOURCE_DIR}/${KCONFIG}" "--dotconfig=${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}/.config" ${KEY}
@@ -28,6 +23,13 @@ config("INSTALL_PLUGINDIR" "Kconfig")
config("INSTALL_APPDIR" "Kconfig")
config("INSTALL_ICONDIR" "Kconfig")
+add_custom_command(OUTPUT "${PROJECT_BINARY_DIR}/include/config.h"
+ COMMAND ${CMAKE_COMMAND} -E env "srctree=${PROJECT_SOURCE_DIR}"
+ ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tools/Kconfiglib/genconfig.py" "--header-path=${PROJECT_BINARY_DIR}/include/config.h" "${PROJECT_SOURCE_DIR}/src/Kconfig"
+ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}")
+
+add_custom_target(config_header DEPENDS "${PROJECT_BINARY_DIR}/include/config.h")
+
# QTBUG defines
execute_process(
COMMAND ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tools/config.py" "--kconfig=${PROJECT_SOURCE_DIR}/src/Kconfig" "--dotconfig=${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}/.config" "QTBUG"
diff --git a/lib/configuration/CMakeLists.txt b/lib/configuration/CMakeLists.txt
index def0356..d5a46ae 100644
--- a/lib/configuration/CMakeLists.txt
+++ b/lib/configuration/CMakeLists.txt
@@ -8,7 +8,10 @@ set(CMAKE_AUTOMOC ON)
add_library(configuration
configuration.cpp
- configuration.h)
+ configuration.h
+)
+
+add_dependencies(configuration config_header)
target_include_directories(configuration
PRIVATE ${Boost_INCLUDE_DIRS}
diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD
index 005f46a..e3bad77 100644
--- a/linux/makepkg/PKGBUILD
+++ b/linux/makepkg/PKGBUILD
@@ -18,13 +18,15 @@ license=('GPL3')
depends=('qt5-webengine>=5.11.0' 'boost-libs>=1.66.0')
optdepends=('firejail: launch a sandboxed instance')
-makedepends=('git' 'cmake' 'pkg-config' 'asciidoctor')
+makedepends=('git' 'cmake' 'pkg-config' 'asciidoctor' 'python')
# this is the central repository
source=("git+https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git#branch=master"
- "git+https://github.com/itay-grudev/SingleApplication.git")
+ "git+https://github.com/itay-grudev/SingleApplication.git"
+ "https://github.com/ulfalizer/Kconfiglib.git")
sha512sums=('SKIP'
+ 'SKIP'
'SKIP')
#validgpgkeys=(# Aqua-sama <aqua@iserlohn-fortress.net>
@@ -36,6 +38,8 @@ prepare() {
git submodule init
git config submodule.3rd-party/SingleApplication/SingleApplication.git.url $srcdir/SingleApplication
git submodule update 3rd-party/SingleApplication/SingleApplication.git
+ git config submodule.tools/Kconfiglib.url $srcdir/Kconfiglib
+ git submodule update tools/Kconfiglib
_tag="r$(git rev-list --count HEAD)"
_describe="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)"
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4ae7448..7f79d14 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -72,6 +72,8 @@ else()
add_executable(${CONFIG_POI_EXE} ${srclist})
endif()
+add_dependencies(${CONFIG_POI_EXE} config_header)
+
target_include_directories(${CONFIG_POI_EXE}
PRIVATE ${Boost_INCLUDE_DIRS}
PRIVATE ${PROJECT_SOURCE_DIR}/include