28 lines
677 B
CMake
28 lines
677 B
CMake
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)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
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
|
|
src/xmppbot/xmppbot.h
|
|
)
|
|
add_dependencies(xmppbot qxmpp)
|
|
|
|
target_link_libraries(xmppbot Qt${QT_VERSION_MAJOR}::Network qxmpp)
|
|
|
|
install(TARGETS xmppbot DESTINATION bin)
|