forked from FulguRat/Minas-A6B-Control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (23 loc) · 818 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
cmake_minimum_required(VERSION 3.0)
# Project Name
set(PROJ_NAME EtherCAT_Test)
project(${PROJ_NAME})
# Binary output path
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
FILE(GLOB HEADER_LIST "${CMAKE_SOURCE_DIR}/src/*.h")
FILE(GLOB SOURCE_LIST "${CMAKE_SOURCE_DIR}/src/*.cpp")
add_executable(${PROJ_NAME} ${SOURCE_LIST} ${HEADER_LIST})
#Boost
find_package(Boost COMPONENTS thread REQUIRED)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(${PROJ_NAME} ${Boost_LIBRARIES})
message("Boost Ready.")
endif()
# SOEM
set(SOEM_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
set(SOEM_LIB "${CMAKE_SOURCE_DIR}/lib/libsoem.a")
set(OS_LIBS pthread rt)
include_directories(${SOEM_INCLUDE_DIR})
target_link_libraries(${PROJ_NAME} ${SOEM_LIB} ${OS_LIBS})
message("SOEM Ready.")