2023-07-23 20:55:45 +02:00
|
|
|
cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR)
|
2016-04-16 19:09:43 +02:00
|
|
|
|
|
|
|
project("passwordmanager-subdirs")
|
|
|
|
set(SUBDIRS_PREFIX "../..")
|
2017-03-27 22:16:51 +02:00
|
|
|
enable_testing()
|
2016-04-16 19:09:43 +02:00
|
|
|
|
|
|
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
|
|
|
|
|
|
|
|
add_subdirectory(${SUBDIRS_PREFIX}/c++utilities c++utilities)
|
2023-03-29 22:09:25 +02:00
|
|
|
set(c++utilities${CONFIGURATION_PACKAGE_SUFFIX}_DIR "${CMAKE_CURRENT_BINARY_DIR}/c++utilities")
|
2016-04-16 19:09:43 +02:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CPP_UTILITIES_SOURCE_DIR}/cmake/modules)
|
2016-07-27 17:34:38 +02:00
|
|
|
link_directories(${CPP_UTILITIES_BINARY_DIR})
|
2016-04-16 19:09:43 +02:00
|
|
|
|
2022-07-10 16:59:57 +02:00
|
|
|
if (QT_PACKAGE_PREFIX STREQUAL "Qt6")
|
|
|
|
# set variables to build KF against Qt 6 as well
|
|
|
|
set(BUILD_WITH_QT6 ON)
|
|
|
|
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT CURRENT)
|
|
|
|
set(QT_MAJOR_VERSION "6")
|
|
|
|
endif ()
|
|
|
|
|
2018-08-31 22:35:53 +02:00
|
|
|
option(WIDGETS_GUI "enables/disables building the Qt Widgets GUI: yes (default) or no" ON)
|
|
|
|
option(QUICK_GUI "enables/disables building the Qt Quick GUI: yes (default) or no" ON)
|
2016-07-27 17:34:38 +02:00
|
|
|
if(WIDGETS_GUI OR QUICK_GUI)
|
|
|
|
add_subdirectory(${SUBDIRS_PREFIX}/qtutilities qtutilities)
|
2023-03-29 22:09:25 +02:00
|
|
|
set(qtutilities${CONFIGURATION_PACKAGE_SUFFIX_QTUTILITIES}_DIR "${CMAKE_CURRENT_BINARY_DIR}/qtutilities")
|
2016-07-27 17:34:38 +02:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_SOURCE_DIR}/cmake/modules)
|
|
|
|
link_directories(${QT_UTILITIES_BINARY_DIR})
|
|
|
|
endif()
|
2018-08-31 22:35:53 +02:00
|
|
|
if(QUICK_GUI)
|
2022-07-10 16:59:57 +02:00
|
|
|
# note: Building ECM as part of the project doesn't work. Simply build ECM sparately like
|
|
|
|
# "cmake -G Ninja -DBUILD_WITH_QT6=ON -DCMAKE_INSTALL_PREFIX=/home/martchus/build/qtcreator2/build-passwordmanager-Desktop-Debug/install /home/martchus/more_projects/kde/extra-cmake-modules"
|
|
|
|
# and set that install dir as ECM_DIR=/home/martchus/build/qtcreator2/build-passwordmanager-Desktop-Debug/install/share/ECM/cmake.
|
2018-08-31 22:35:53 +02:00
|
|
|
|
|
|
|
set(KIRIGAMI_PATH OFF CACHE PATH "specifies the (relative) path to the Kirigami 2 sources for building it together with passwordmanager")
|
|
|
|
if(NOT KIRIGAMI_PATH)
|
|
|
|
message(STATUS "Using system Kirigami (KIRIGAMI_PATH not set)")
|
|
|
|
else()
|
|
|
|
add_subdirectory("${KIRIGAMI_PATH}" kirigami)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${KIRIGAMI_PATH}")
|
|
|
|
endif()
|
|
|
|
endif()
|
2016-04-16 19:09:43 +02:00
|
|
|
|
|
|
|
add_subdirectory(${SUBDIRS_PREFIX}/passwordfile passwordfile)
|
2023-03-29 22:09:25 +02:00
|
|
|
set(passwordfile${CONFIGURATION_PACKAGE_SUFFIX}_DIR "${CMAKE_CURRENT_BINARY_DIR}/passwordfile")
|
2016-07-27 17:34:38 +02:00
|
|
|
link_directories(${PASSWORD_FILE_BINARY_DIR})
|
|
|
|
|
2016-07-16 23:17:20 +02:00
|
|
|
add_subdirectory(${SUBDIRS_PREFIX}/passwordmanager passwordmanager)
|