2021-04-29 16:11:51 +02:00
|
|
|
cmake_minimum_required(VERSION 3.7)
|
|
|
|
|
|
|
|
project(xmppbot LANGUAGES CXX)
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
|
2021-04-29 19:24:04 +02:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
2021-04-29 16:11:51 +02:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Network REQUIRED)
|
|
|
|
|
|
|
|
add_subdirectory(src/3rdparty/qxmpp)
|
|
|
|
add_executable(xmppbot
|
|
|
|
src/xmppbot/main.cpp
|
|
|
|
src/xmppbot/unixsocket.cpp
|
|
|
|
src/xmppbot/unixsocket.h
|
2021-04-29 18:56:12 +02:00
|
|
|
src/xmppbot/xmppbot.h
|
2021-04-29 16:11:51 +02:00
|
|
|
)
|
|
|
|
add_dependencies(xmppbot qxmpp)
|
|
|
|
|
|
|
|
target_link_libraries(xmppbot Qt${QT_VERSION_MAJOR}::Network qxmpp)
|
|
|
|
|
|
|
|
install(TARGETS xmppbot DESTINATION bin)
|