forked from open-edge-platform/edge-ai-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfind_plcopen_servo.cmake
More file actions
47 lines (44 loc) · 1.51 KB
/
find_plcopen_servo.cmake
File metadata and controls
47 lines (44 loc) · 1.51 KB
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
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2025 Intel Corporation
# Find plcopen-servo
find_library(
SERVO_LIBRARIES
NAMES plcopen_servo
HINTS ${ROOTDIR}/usr/lib ${ROOTDIR}/usr/local/lib)
find_path(
SERVO_INCLUDE_DIRS
NAMES ecrt_servo.hpp
HINTS ${ROOTDIR}/usr/include ${ROOTDIR}/usr/local/include)
if (NOT SERVO_LIBRARIES)
message(ERROR " SERVO library not found under: ${ROOTDIR}/usr/lib ${ROOTDIR}/usr/local/lib")
endif()
if (NOT SERVO_INCLUDE_DIRS)
message(ERROR " SERVO headers not found under: ${ROOTDIR}/usr/include ${ROOTDIR}/usr/local/include")
endif()
message(STATUS "SERVO_INCLUDE_DIRS: ${SERVO_INCLUDE_DIRS}")
message(STATUS "SERVO_LIBRARIES: ${SERVO_LIBRARIES}")
# Include servo headers
include_directories(
${SERVO_INCLUDE_DIRS}
)
# Find symg_servo
find_library(
SYMG_SERVO_LIBRARIES
NAMES plcopen_servo_symg
HINTS ${ROOTDIR}/usr/lib ${ROOTDIR}/usr/local/lib)
find_path(
SYMG_SERVO_INCLUDE_DIRS
NAMES symg_servo.hpp
HINTS ${ROOTDIR}/usr/include ${ROOTDIR}/usr/local/include)
if (NOT SYMG_SERVO_LIBRARIES)
message(ERROR " SERVO library not found under: ${ROOTDIR}/usr/lib ${ROOTDIR}/usr/local/lib")
endif()
if (NOT SYMG_SERVO_INCLUDE_DIRS)
message(ERROR " SERVO headers not found under: ${ROOTDIR}/usr/include ${ROOTDIR}/usr/local/include")
endif()
message(STATUS "SYMG_SERVO_LIBRARIES: ${SYMG_SERVO_LIBRARIES}")
message(STATUS "SYMG_SERVO_INCLUDE_DIRS: ${SYMG_SERVO_INCLUDE_DIRS}")
# Include ighethercat headers
include_directories(
${SYMG_SERVO_INCLUDE_DIRS}
)