Actin  Version 5.5.5
Software for Robotics Simulation and Control
Actin SDK New Build System

Overview

Actin does not place any requirements on customers regarding how they use the Actin SDK.

However, for maximum convenience, CMake Packages are provided for third party consumers of the Actin SDK.

Example Library CMake Script

The following CMake script creates a shared library using the Actin xmlReaderWriter library:

1 cmake_minimum_required(VERSION 3.10)
2 project(exampleIO VERSION 1.0)
3 
4 find_package(ActinCore REQUIRED)
5 
6 add_library(mylibrary SHARED ecExampleIO.cpp)
7 target_link_libraries(mylibrary PRIVATE
8  Actin::xmlReaderWriter
9  )

Example Executable CMake Script

The following CMake script example creates an executable that links to some additional libraries for rendering.

1 cmake_minimum_required(VERSION 3.10)
2 project(quickStartExample VERSION 1.0)
3 
4 find_package(ActinToolkits REQUIRED)
5 
6 add_executable(quickStart
7  ecQuickStartExample.cpp
8  ecQuickStartMain.cpp
9 )
10 target_link_libraries(quickStart PRIVATE
11  Actin::rendCore
12 )

Example Actin XML Object Plugin CMake Script

The following CMake script example creates a libary and a plugin for an EcXmlObject. The resulting backend plugin can be loaded dynamically into an XML container at runtime as the XML file is read in.

1 cmake_minimum_required(VERSION 3.10)
2 project(exampleIoModule VERSION 1.0)
3 
4 find_package(ActinToolkits REQUIRED)
5 
6 add_library(myLib SHARED
7  ecExampleIoModule.cpp
8  ecExampleAnalogInputChannel.cpp
9  ecExampleAnalogOutputChannel.cpp
10  ecExampleDigitalInputChannel.cpp
11  ecExampleDigitalOutputChannel.cpp
12  ecExampleTokens.cpp
13 )
14 target_link_libraries(myLib PRIVATE Actin::xmlReaderWriter)
15 
16 ec_file_plugin_accessors_create(accessorsSourceFile myLib
17  EcExampleIoModule
18  EcExampleAnalogInputChannel
19  EcExampleAnalogOutputChannel
20  EcExampleDigitalInputChannel
21  EcExampleDigitalOutputChannel
22 )
23 
24 ec_actin_plugin_extension(myLib
25  "${accessorsSourceFile}"
26 )

Example Actin Plugin CMake Script

The following CMake script example creates an Actin plugin.

1 cmake_minimum_required(VERSION 3.10)
2 project(examplePlugin VERSION 1.0)
3 
4 find_package(ActinToolkits REQUIRED)
5 
6 add_library(myPlugin MODULE examplePlugin.cpp)
7 target_link_libraries(myPlugin PRIVATE Actin::plugins)