console: basic code.
This commit is contained in:
17
Console/CMakeLists.txt
Normal file
17
Console/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(frelayConsole LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Network)
|
||||
|
||||
add_executable(frelayConsole Console.h Console.cpp main.cpp ../Res/ico.rc)
|
||||
target_link_libraries(frelayConsole PRIVATE Protocol Util)
|
||||
target_link_libraries(frelayConsole PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||
1
Console/Console.cpp
Normal file
1
Console/Console.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include "Console.h"
|
||||
9
Console/Console.h
Normal file
9
Console/Console.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef FRELAY_CONSOLE_H
|
||||
#define FRELAY_CONSOLE_H
|
||||
|
||||
class RelayConsole
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
#endif // FRELAY_CONSOLE_H
|
||||
14
Console/main.cpp
Normal file
14
Console/main.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "Console.h"
|
||||
#include <Util.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
Util::InitLogger("frelayConsole.log", "frelayConsole");
|
||||
qInstallMessageHandler(Util::ConsoleMsgHander);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
Reference in New Issue
Block a user