Add modern CMake support in future ?

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
xueliu
Jr. Member
Jr. Member
Posts: 1
Joined: 28 Nov 2018, 16:43

Add modern CMake support in future ?

Post by xueliu »

Hello

I am a new user with uasdkcppbundle-src-debian9.3-x86_64-gcc6.3.0-v1.6.3-406.tar.gz.
In the uasdk CMake is used to compile the source code but it can not export CMake configurations files such as xxx-config-version.cmake and xxx-targets.cmake.
Without these files I can not import the uasdk libraries in my CMake project.
Is there a plan to add this feature ?

Regards,

Xue Liu

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Add modern CMake support in future ?

Post by Support Team »

Hello Xue Liu,

in your CMake project, simply set the CMAKE_MODULE_PATH to the SDK's 'cmake' folder add includes for ConfigureUaStack and ConfigureAnsiCSdk as follows:

Code: Select all

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake ${CMAKE_MODULE_PATH})

include(ConfigureUaStack)
include(ConfigureAnsiCSdk)
After this, you can use the XYZ_INCLUDE and XYZ_LIBRARY variables just like in our demo server application:

Code: Select all

include_directories(${UASTACK_INCLUDE})
...

target_link_libraries(${PROJECT_NAME} ${UASTACK_LIBRARY})
...
Best regards
Unified Automation Support Team

Post Reply