-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
32 lines (25 loc) · 989 Bytes
/
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
cmake_minimum_required(VERSION 3.1.0)
project(bobcpp)
set(CMAKE_CXX_STANDARD 11)
# Only Qt implementation is available right now
set(USE_Qt 1)
if(USE_Qt)
message("bobcpp will use the Qt implementation.")
add_compile_definitions(BOBCPP_QT=1)
find_package(Qt5 COMPONENTS Core Network REQUIRED)
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
endif()
include_directories(${PROJECT_SOURCE_DIR}/include/)
add_library(bobcpp SHARED
src/Exception.cpp
src/QtClient.cpp
src/bobcpp.cpp
)
set(HEADER_FILES ${PROJECT_SOURCE_DIR}/include/bobcpp/bobcpp.h
${PROJECT_SOURCE_DIR}/include/bobcpp/AbstractClient.h
${PROJECT_SOURCE_DIR}/include/bobcpp/Data.h
${PROJECT_SOURCE_DIR}/include/bobcpp/Exception.h
${PROJECT_SOURCE_DIR}/include/bobcpp/QtClient.h)
install(TARGETS bobcpp
LIBRARY DESTINATION /usr/lib)
install(FILES ${HEADER_FILES} DESTINATION /usr/include/bobcpp/)