Skip to content

Commit

Permalink
added build check for Qt on the server
Browse files Browse the repository at this point in the history
added Qt5Sql path in CMake for the server
  • Loading branch information
nopesir committed Oct 12, 2020
1 parent cb9dada commit 3a6c09c
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 121 deletions.
13 changes: 13 additions & 0 deletions build-run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#!/bin/sh

# This is a comment!

cwd=$(pwd)

cd ~/
if [ -d "Qt" ]; then
cd Qt
if [! -d "5.12.2" ]; then
echo Install Qt 5.12.2 from Qt Maintenance Tool
fi
fi

cd $cwd

cd server
if [ -d "build" ]; then
# Take action if $DIR exists. #
Expand Down
7 changes: 4 additions & 3 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
cmake_minimum_required(VERSION 3.13)
project(ServerModule)
cmake_minimum_required(VERSION 3.13)
project(ServerModule)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lcurl -pthread")
set(Qt5Sql_DIR ~/Qt/5.15.1/gcc_64/lib/cmake/Qt5Sql/)

find_package(Qt5Sql REQUIRED)

add_compile_options(-l sqlite3)
add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)
add_executable(ServerModule main.cpp Server.cpp Server.h Session.cpp Session.h jsonUtility.cpp jsonUtility.h dbService.cpp dbService.h Client.cpp Client.h Message.cpp Message.h fileUtility.cpp fileUtility.h Symbol.cpp Symbol.h File.cpp File.h SymStyle.h SymStyle.cpp email.cpp email.h SharedEditor.cpp SharedEditor.h)

target_link_libraries(ServerModule LINK_PUBLIC sqlite3 Qt5::Sql curl)
target_link_libraries(ServerModule LINK_PUBLIC sqlite3 curl Qt5::Sql)
Loading

0 comments on commit 3a6c09c

Please sign in to comment.