Added CMakeLists.txt
This commit is contained in:
6
CMakeLists.txt
Normal file
6
CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
project(DbMessaging)
|
||||
|
||||
add_subdirectory(messagingclient)
|
||||
add_subdirectory(messaginglib)
|
||||
add_subdirectory(messagingserver)
|
||||
add_subdirectory(messagingtest)
|
12
messagingclient/CMakeLists.txt
Normal file
12
messagingclient/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
project(messagingclient)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
main.cpp
|
||||
)
|
||||
|
||||
add_executable(messagingclient ${HEADERS} ${SOURCES})
|
||||
|
||||
target_link_libraries(messagingclient Qt5::Core Qt5::Network messaginglib)
|
@@ -1,4 +1,7 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDate>
|
||||
#include <QDateTime>
|
||||
#include <QVariantMap>
|
||||
#include <QDebug>
|
||||
|
||||
#include "messages/mymessage.h"
|
||||
|
24
messaginglib/CMakeLists.txt
Normal file
24
messaginglib/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
project(messaginglib)
|
||||
|
||||
set(HEADERS
|
||||
dbmsgbase.h
|
||||
dbmsgfieldbase.h
|
||||
dbmsgfield.h
|
||||
dbmsgmacros.h
|
||||
messaginglib_global.h
|
||||
messages/mymessage.h
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
dbmsgbase.cpp
|
||||
dbmsgfieldbase.cpp
|
||||
messages/mymessage.cpp
|
||||
)
|
||||
|
||||
add_library(messaginglib ${HEADERS} ${SOURCES})
|
||||
|
||||
target_compile_definitions(messaginglib PRIVATE MESSAGINGLIB_LIBRARY)
|
||||
|
||||
target_link_libraries(messaginglib Qt5::Core Qt5::Network)
|
||||
|
||||
target_include_directories(messaginglib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
16
messagingserver/CMakeLists.txt
Normal file
16
messagingserver/CMakeLists.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
project(messagingserver)
|
||||
|
||||
set(HEADERS
|
||||
client.h
|
||||
server.h
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
client.cpp
|
||||
main.cpp
|
||||
server.cpp
|
||||
)
|
||||
|
||||
add_executable(messagingserver ${HEADERS} ${SOURCES})
|
||||
|
||||
target_link_libraries(messagingserver Qt5::Core Qt5::Network messaginglib)
|
15
messagingtest/CMakeLists.txt
Normal file
15
messagingtest/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
project(messagingtest)
|
||||
enable_testing()
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
tst_messagingtest.cpp
|
||||
)
|
||||
|
||||
add_executable(messagingtest ${HEADERS} ${SOURCES})
|
||||
|
||||
add_test(messagingtest messagingtest)
|
||||
|
||||
target_link_libraries(messagingtest Qt5::Core Qt5::Test messaginglib)
|
Reference in New Issue
Block a user