Hello Chetan,
yesterday we talked about, how to use the SDK to build a simple C++ program for a PLCnext control device, in Eclipse.
As discussed, It must be possible to create a project with Template "Consumable Lbrary" and adapt the CMakeLists.txt to compile the project as executable:
- Add a main() program in project
- disable the command "add_library"
- Add the command "add_executable"
################# create target ######################################################################## create target #######################################################
set (WILDCARD_SOURCE *.cpp)set (WILDCARD_HEADER *.h *.hpp *.hxx)
file(GLOB_RECURSE Headers CONFIGURE_DEPENDS src/${WILDCARD_HEADER})
file(GLOB_RECURSE PublicHeaders CONFIGURE_DEPENDS include/${WILDCARD_HEADER})
file(GLOB_RECURSE Sources CONFIGURE_DEPENDS src/${WILDCARD_SOURCE})
#add_library(TestProject SHARED ${Headers} ${PublicHeaders} ${Sources})
add_executable(TestProject ${Headers} ${Sources})
Best Regards
Eduard
Phoenix Contact Electronics Headquarter - PLCnext Runtime Product Management and Support