-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
47 lines (36 loc) · 1.27 KB
/
CMakeLists.txt
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
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.8)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PROJECT_NAME CppSocketLibrary)
project(${PROJECT_NAME} VERSION 0.5.4)
set(HEADERS
src/serversocket/ServerSocket.h
src/socket/Socket.h
src/socket/TCPSocket.h
src/socket/UDPSocket.h
src/address/SocketAddress.h
src/socketexceptions/BindingException.hpp
src/socketexceptions/SocketException.hpp
src/socketexceptions/TimeoutException.hpp
src/socketexceptions/SocketError.h
src/enums/InternetProtocolVersion.h
)
set(SOURCE
src/serversocket/ServerSocket.cpp
src/socket/Socket.cpp
src/socket/TCPSocket.cpp
src/socket/UDPSocket.cpp
src/socketexceptions/SocketError.cpp
src/address/SocketAddress.cpp
)
# Project Configuration - Adding as a lib
add_library(${PROJECT_NAME} STATIC ${SOURCE} ${HEADERS})
if(CMAKE_HOST_WIN32)
endif()
if(CMAKE_HOST_UNIX)
include_directories(/usr/include/glib-2.0)
include_directories(/usr/lib/x86_64-linux-gnu/glib-2.0/include)
target_link_libraries(${PROJECT_NAME} PRIVATE bluetooth)
target_link_libraries(${PROJECT_NAME} PRIVATE glib-2.0)
endif()
add_subdirectory(tests)