atrooney-online-2/CMakeLists.txt
Salanto f0a5e48f5c
Dual-Stack AO2 Client to handle both TCP and Websocket connections seemlessly (#696)
* Replace TCP Serversocket with Websocket

* Have TCP sockets live harmoniously with WS

"like 5 lines" yeah probably lost a bet.

* Update .gitlab-ci.yml

* hack to fix favorites

* Add support for websockets in the favorites list (serverlist.txt)
Make "add_favorite_server" remember the socket type

* Preserve old serverlist style

This will keep new entries compatible with 2.9 and prior clients. Makes parsing the list easier too.

* Add lookup table and correct write code to use lowercase

* I have no idea what a lookup table is, but this looks close enough

* Fix lookup table

* Otherwise backend selection behaviour is inverted

* clang-tidy had one job

* Yet it did not do it.

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>

* const p_data

* Switch serverlist.txt to an ini format

* Fixes an Omni bug where : would split the servername
* Utilises internally QSettings properly for low parsing effort and clear structure
* Automatically migrates the legacy serverlist.txt to favorite_servers.ini
* Pleases my OCD

* Replace sample serverlist.

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Co-authored-by: stonedDiscord <Tukz@gmx.de>
Co-authored-by: Alex Noir <Varsash@gmail.com>
2022-06-06 19:14:44 +02:00

44 lines
1.2 KiB
CMake

# Configure cmake
cmake_minimum_required(VERSION 3.1.0)
cmake_policy(SET CMP0076 NEW) # silence warning
project(AttorneyOnline)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
# AO
add_executable(Attorney_Online resources.qrc)
# WIN32
if(WIN32)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set_property(TARGET Attorney_Online PROPERTY WIN32_EXECUTABLE true)
set(APP_ICON_RESOURCE_WINDOWS "${CMAKE_CURRENT_SOURCE_DIR}/resource/logo_ao2.rc")
target_sources(Attorney_Online PRIVATE ${APP_ICON_RESOURCE_WINDOWS})
endif()
endif()
# Target Include
target_include_directories(Attorney_Online PRIVATE include)
# Target Lib
find_package(Qt5 COMPONENTS Core Gui Network Widgets Concurrent WebSockets REQUIRED)
target_link_directories(Attorney_Online PRIVATE lib)
target_link_libraries(Attorney_Online PRIVATE Qt5::Core Qt5::Gui Qt5::Network Qt5::Widgets Qt5::Concurrent
Qt5::WebSockets bass bassmidi bassopus discord-rpc)
target_compile_definitions(Attorney_Online PRIVATE DISCORD)
# Subdirectories
add_subdirectory(test)
add_subdirectory(src)
add_subdirectory(include)