2019-03-29 14:54:34 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
project(squawkCORE)
|
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
2019-10-14 20:18:51 +00:00
|
|
|
find_package(Qt5Core CONFIG REQUIRED)
|
2019-10-15 19:25:40 +00:00
|
|
|
find_package(Qt5Gui CONFIG REQUIRED)
|
2019-03-29 14:54:34 +00:00
|
|
|
find_package(Qt5Network CONFIG REQUIRED)
|
2019-10-15 19:25:40 +00:00
|
|
|
find_package(Qt5Xml CONFIG REQUIRED)
|
2019-03-29 14:54:34 +00:00
|
|
|
|
2021-10-05 04:49:06 +00:00
|
|
|
# Find LMDB from system or ${LMDB_DIR}
|
|
|
|
find_path(LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "${LMDB_DIR}/include")
|
|
|
|
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
# Linux
|
2021-10-05 08:09:31 +00:00
|
|
|
find_library(sudo rLMDB_LIBRARIES NAMES liblmdb.a liblmdb.so PATHS ${LMDB_DIR})
|
2021-10-05 04:49:06 +00:00
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
else (UNIX AND NOT APPLE)
|
|
|
|
# Windows / macOS: LMDB_DIR has to be specified
|
|
|
|
set(LMDB_LIBRARIES "${LMDB_DIR}/lib/liblmdb.a")
|
|
|
|
endif (UNIX AND NOT APPLE)
|
|
|
|
|
2019-03-29 14:54:34 +00:00
|
|
|
set(squawkCORE_SRC
|
|
|
|
squawk.cpp
|
|
|
|
account.cpp
|
2019-04-15 22:35:09 +00:00
|
|
|
archive.cpp
|
2019-08-14 14:54:46 +00:00
|
|
|
rosteritem.cpp
|
2019-04-17 20:08:56 +00:00
|
|
|
contact.cpp
|
2019-08-21 09:35:07 +00:00
|
|
|
conference.cpp
|
2019-09-11 15:03:52 +00:00
|
|
|
storage.cpp
|
2019-09-17 15:16:09 +00:00
|
|
|
networkaccess.cpp
|
2019-11-05 18:55:21 +00:00
|
|
|
adapterFuctions.cpp
|
2020-04-28 20:35:52 +00:00
|
|
|
handlers/messagehandler.cpp
|
2020-06-14 21:23:43 +00:00
|
|
|
handlers/rosterhandler.cpp
|
2019-03-29 14:54:34 +00:00
|
|
|
)
|
|
|
|
|
2020-04-10 22:15:08 +00:00
|
|
|
add_subdirectory(passwordStorageEngines)
|
|
|
|
|
2019-03-29 14:54:34 +00:00
|
|
|
# Tell CMake to create the helloworld executable
|
|
|
|
add_library(squawkCORE ${squawkCORE_SRC})
|
|
|
|
|
2021-10-05 04:49:06 +00:00
|
|
|
target_include_directories(squawkCORE PUBLIC ${LMDB_INCLUDE_DIR})
|
2020-04-09 22:48:08 +00:00
|
|
|
|
2019-10-07 15:35:55 +00:00
|
|
|
if(SYSTEM_QXMPP)
|
|
|
|
get_target_property(QXMPP_INTERFACE_INCLUDE_DIRECTORIES QXmpp::QXmpp INTERFACE_INCLUDE_DIRECTORIES)
|
|
|
|
target_include_directories(squawkCORE PUBLIC ${QXMPP_INTERFACE_INCLUDE_DIRECTORIES})
|
|
|
|
endif()
|
|
|
|
|
2019-03-29 14:54:34 +00:00
|
|
|
# Use the Widgets module from Qt 5.
|
|
|
|
target_link_libraries(squawkCORE Qt5::Core)
|
|
|
|
target_link_libraries(squawkCORE Qt5::Network)
|
2019-10-15 19:25:40 +00:00
|
|
|
target_link_libraries(squawkCORE Qt5::Gui)
|
|
|
|
target_link_libraries(squawkCORE Qt5::Xml)
|
2019-03-29 14:54:34 +00:00
|
|
|
target_link_libraries(squawkCORE qxmpp)
|
2021-10-05 04:49:06 +00:00
|
|
|
|
|
|
|
target_link_libraries(squawkCORE ${LMDB_LIBRARIES})
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
# Linux
|
|
|
|
target_link_libraries(squawkCORE Threads::Threads)
|
|
|
|
endif (UNIX AND NOT APPLE)
|
|
|
|
|
2020-04-07 20:33:03 +00:00
|
|
|
target_link_libraries(squawkCORE simpleCrypt)
|
2020-04-10 22:15:08 +00:00
|
|
|
if (WITH_KWALLET)
|
|
|
|
target_link_libraries(squawkCORE kwalletPSE)
|
|
|
|
endif()
|