-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
59 lines (51 loc) · 840 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
cmake_minimum_required(VERSION 2.8)
project(Cube)
add_compile_options(-std=c++11 -Wall -Wextra)
# WiringPi does not have a CMake module
set(
CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake/Modules/"
)
# Locate libraries and headers
find_package(WiringPi REQUIRED)
find_package(Threads REQUIRED)
# Include headers
include_directories(
include
${WIRINGPI_INCLUDE_DIRS}
)
# StaticCube library
add_library(
staticcube
staticcube.cpp
)
#DynamicCube Library
add_Library(
dynamiccube
dynamiccube.cpp
)
# Draw library
add_library(
draw
draw.cpp
)
target_link_libraries(
draw
${WIRINGPI_LIBRARIES}
# ${CMAKE_THREAD_LIBS_INIT}
${CMAKE_THREAD_LIBS_INIT} -lrt
)
# Main program
add_executable(
hello
main.cpp
)
target_link_libraries(
hello
staticcube
dynamiccube
draw
pthread
rt
)