Update password manager project for Qt Quick / Android

* At least attempt to bundle ECM and Kirigami
* Add GUI options
* Add symlink to android folder so ECM can find it
* Add symlink to qml files so the imports of these files
  are considered by androiddeployqt
This commit is contained in:
Martchus 2018-08-31 22:35:53 +02:00
parent 755bac0ad0
commit f3b12f90b4
3 changed files with 29 additions and 0 deletions

View File

@ -10,11 +10,38 @@ add_subdirectory(${SUBDIRS_PREFIX}/c++utilities c++utilities)
list(APPEND CMAKE_MODULE_PATH ${CPP_UTILITIES_SOURCE_DIR}/cmake/modules)
link_directories(${CPP_UTILITIES_BINARY_DIR})
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)
if(WIDGETS_GUI OR QUICK_GUI)
add_subdirectory(${SUBDIRS_PREFIX}/qtutilities qtutilities)
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_SOURCE_DIR}/cmake/modules)
link_directories(${QT_UTILITIES_BINARY_DIR})
endif()
if(QUICK_GUI)
set(ECM_PATH OFF CACHE PATH "specifies the (relative) path to the extra-cmake-modules sources for building it together with passwordmanager")
if(NOT ECM_PATH)
message(STATUS "Using system extra-cmake-modules (ECM_PATH not set)")
else()
# FIXME: building ecm in the same project doesn't seem to work since it has references to the installed location
add_subdirectory("${ECM_PATH}" ecm)
#file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/bundled-ecm")
#file(WRITE "${CMAKE_BINARY_DIR}/bundled-ecm/ECMConfig.cmake" "set(ECM_MODULE_DIR ${ECM_PATH}/modules)")
set(ECM_DIR "${CMAKE_BINARY_DIR}/bundled-ecm")
list(APPEND CMAKE_MODULE_PATH
"${ECM_PATH}/modules"
"${ECM_PATH}/kde-modules"
"${ECM_PATH}/find-modules"
)
endif()
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()
add_subdirectory(${SUBDIRS_PREFIX}/passwordfile passwordfile)
link_directories(${PASSWORD_FILE_BINARY_DIR})

1
passwordmanager/android Symbolic link
View File

@ -0,0 +1 @@
../../passwordmanager/android

1
passwordmanager/qml Symbolic link
View File

@ -0,0 +1 @@
../../passwordmanager/qml