forked from Chunpeng19/smarty_arm_control
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (32 loc) · 868 Bytes
/
CMakeLists.txt
File metadata and controls
40 lines (32 loc) · 868 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
35
36
37
38
39
40
cmake_minimum_required(VERSION 2.8)
project(smarty_arm_control C CXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
set(CMAKE_POSITION_INDEPENDENT_CODE true)
set(OS_LIBS pthread rt m)
# SOEM
find_package(soem)
# Add the headers from the <include> directory
include_directories(
include/
)
# Add the source files from the <src> directory
add_library(${PROJECT_NAME}_lib
src/arm_ecat.c
src/init_AEV.c
src/arm_base.c
src/shm.c
src/smarty_arm_control.c
)
target_link_libraries(${PROJECT_NAME}_lib soem ${OS_LIBS})
# Add the executable files
add_executable(${PROJECT_NAME}
src/smarty_arm_run.c
)
# Linking for libraries
target_link_libraries(${PROJECT_NAME}
${PROJECT_NAME}_lib
)
# Install the executable
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
)