forked from JaiMaaSheeravali/File_Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (25 loc) · 780 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (25 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# only for cmake --version >= 3.5.1
cmake_minimum_required(VERSION 3.5.1)
# project name
project(server)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output)
# creates the variable EXEC and sets it to hello
set(EXEC server)
# set the C++17 standard
set(CMAKE_CXX_STANDARD 17)
# I../includes
include_directories(include)
include_directories(/usr/include/cppconn)
link_directories(/usr/lib)
# puts all .cpp files inside src to the SOURCES variable
file(GLOB SOURCES src/*.c*)
# compiles the files defined by SOURCES to generates the executable defined by EXEC
add_executable(${EXEC} ${SOURCES})
# include pthread library
find_package (Threads REQUIRED)
target_link_libraries(${EXEC}
mysqlcppconn
)
target_link_libraries(${EXEC}
${CMAKE_THREAD_LIBS_INIT}
)