forked from blue/squawk
patches from Vae about making libraries static, and about boost, findLMDB CMake script, drop dependency for qtquickcontrols
This commit is contained in:
parent
f45319de25
commit
ce047db787
@ -12,7 +12,6 @@ include(GNUInstallDirs)
|
|||||||
include_directories(.)
|
include_directories(.)
|
||||||
|
|
||||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||||
find_package(Qt5QuickCompiler CONFIG REQUIRED)
|
|
||||||
find_package(Qt5LinguistTools)
|
find_package(Qt5LinguistTools)
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
- lmdb
|
- lmdb
|
||||||
- CMake 3.0 or higher
|
- CMake 3.0 or higher
|
||||||
- qxmpp 1.1.0 or higher
|
- qxmpp 1.1.0 or higher
|
||||||
- kwallet (optional)
|
- KDE Frameworks: kwallet (optional)
|
||||||
|
- KDE Frameworks: KIO (optional)
|
||||||
|
|
||||||
### Getting
|
### Getting
|
||||||
|
|
||||||
|
47
cmake/FindLMDB.cmake
Normal file
47
cmake/FindLMDB.cmake
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#This file is taken from here https://gitlab.ralph.or.at/causal-rt/causal-cpp/, it was GPLv3 license
|
||||||
|
#Thank you so much, mr. Ralph Alexander Bariz, I hope you don't mind me using your code
|
||||||
|
|
||||||
|
# Try to find LMDB headers and library.
|
||||||
|
#
|
||||||
|
# Usage of this module as follows:
|
||||||
|
#
|
||||||
|
# find_package(LMDB)
|
||||||
|
#
|
||||||
|
# Variables used by this module, they can change the default behaviour and need
|
||||||
|
# to be set before calling find_package:
|
||||||
|
#
|
||||||
|
# LMDB_ROOT_DIR Set this variable to the root installation of
|
||||||
|
# LMDB if the module has problems finding the
|
||||||
|
# proper installation path.
|
||||||
|
#
|
||||||
|
# Variables defined by this module:
|
||||||
|
#
|
||||||
|
# LMDB_FOUND System has LMDB library/headers.
|
||||||
|
# LMDB_LIBRARIES The LMDB library.
|
||||||
|
# LMDB_INCLUDE_DIRS The location of LMDB headers.
|
||||||
|
|
||||||
|
find_path(LMDB_ROOT_DIR
|
||||||
|
NAMES include/lmdb.h
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(LMDB_LIBRARIES
|
||||||
|
NAMES lmdb
|
||||||
|
HINTS ${LMDB_ROOT_DIR}/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
find_path(LMDB_INCLUDE_DIRS
|
||||||
|
NAMES lmdb.h
|
||||||
|
HINTS ${LMDB_ROOT_DIR}/include
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LMDB DEFAULT_MSG
|
||||||
|
LMDB_LIBRARIES
|
||||||
|
LMDB_INCLUDE_DIRS
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
LMDB_ROOT_DIR
|
||||||
|
LMDB_LIBRARIES
|
||||||
|
LMDB_INCLUDE_DIRS
|
||||||
|
)
|
@ -1,12 +1,15 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.3)
|
||||||
project(squawkCORE)
|
project(squawkCORE)
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
find_package(Qt5Core CONFIG REQUIRED)
|
find_package(Qt5Core CONFIG REQUIRED)
|
||||||
find_package(Qt5Gui CONFIG REQUIRED)
|
find_package(Qt5Gui CONFIG REQUIRED)
|
||||||
find_package(Qt5Network CONFIG REQUIRED)
|
find_package(Qt5Network CONFIG REQUIRED)
|
||||||
find_package(Qt5Xml CONFIG REQUIRED)
|
find_package(Qt5Xml CONFIG REQUIRED)
|
||||||
|
find_package(LMDB REQUIRED)
|
||||||
|
|
||||||
set(squawkCORE_SRC
|
set(squawkCORE_SRC
|
||||||
squawk.cpp
|
squawk.cpp
|
||||||
@ -25,7 +28,7 @@ set(squawkCORE_SRC
|
|||||||
add_subdirectory(passwordStorageEngines)
|
add_subdirectory(passwordStorageEngines)
|
||||||
|
|
||||||
# Tell CMake to create the helloworld executable
|
# Tell CMake to create the helloworld executable
|
||||||
add_library(squawkCORE ${squawkCORE_SRC})
|
add_library(squawkCORE STATIC ${squawkCORE_SRC})
|
||||||
|
|
||||||
|
|
||||||
if(SYSTEM_QXMPP)
|
if(SYSTEM_QXMPP)
|
||||||
|
@ -14,7 +14,7 @@ if (WITH_KWALLET)
|
|||||||
kwallet.cpp
|
kwallet.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(kwalletPSE ${kwalletPSE_SRC})
|
add_library(kwalletPSE STATIC ${kwalletPSE_SRC})
|
||||||
|
|
||||||
target_include_directories(kwalletPSE PUBLIC ${KWALLET_INTERFACE_INCLUDE_DIRECTORIES})
|
target_include_directories(kwalletPSE PUBLIC ${KWALLET_INTERFACE_INCLUDE_DIRECTORIES})
|
||||||
target_include_directories(kwalletPSE PUBLIC ${Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES})
|
target_include_directories(kwalletPSE PUBLIC ${Qt5GUI_INTERFACE_INCLUDE_DIRECTORIES})
|
||||||
|
2
external/simpleCrypt/CMakeLists.txt
vendored
2
external/simpleCrypt/CMakeLists.txt
vendored
@ -10,7 +10,7 @@ set(simplecrypt_SRC
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Tell CMake to create the helloworld executable
|
# Tell CMake to create the helloworld executable
|
||||||
add_library(simpleCrypt ${simplecrypt_SRC})
|
add_library(simpleCrypt STATIC ${simplecrypt_SRC})
|
||||||
|
|
||||||
# Use the Widgets module from Qt 5.
|
# Use the Widgets module from Qt 5.
|
||||||
target_link_libraries(simpleCrypt Qt5::Core)
|
target_link_libraries(simpleCrypt Qt5::Core)
|
||||||
|
@ -8,8 +8,7 @@ set(CMAKE_AUTOUIC ON)
|
|||||||
|
|
||||||
# Find the QtWidgets library
|
# Find the QtWidgets library
|
||||||
find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets DBus Core)
|
find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets DBus Core)
|
||||||
find_package(Boost 1.36.0 CONFIG REQUIRED COMPONENTS
|
find_package(Boost 1.36.0 REQUIRED)
|
||||||
date_time filesystem iostreams)
|
|
||||||
if(Boost_FOUND)
|
if(Boost_FOUND)
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
@ -35,7 +34,7 @@ set(squawkUI_SRC
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Tell CMake to create the helloworld executable
|
# Tell CMake to create the helloworld executable
|
||||||
add_library(squawkUI ${squawkUI_SRC})
|
add_library(squawkUI STATIC ${squawkUI_SRC})
|
||||||
|
|
||||||
# Use the Widgets module from Qt 5.
|
# Use the Widgets module from Qt 5.
|
||||||
target_link_libraries(squawkUI squawkWidgets)
|
target_link_libraries(squawkUI squawkWidgets)
|
||||||
|
@ -16,7 +16,7 @@ set(vCardUI_SRC
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Tell CMake to create the helloworld executable
|
# Tell CMake to create the helloworld executable
|
||||||
add_library(vCardUI ${vCardUI_SRC})
|
add_library(vCardUI STATIC ${vCardUI_SRC})
|
||||||
|
|
||||||
# Use the Widgets module from Qt 5.
|
# Use the Widgets module from Qt 5.
|
||||||
target_link_libraries(vCardUI Qt5::Widgets)
|
target_link_libraries(vCardUI Qt5::Widgets)
|
||||||
|
Loading…
Reference in New Issue
Block a user