mondinmr - 2022-05-31

I created a .pro file in QtCreator to simplify cross compilation and component developing for CODESYS Extendion Package SL.

This can be used simply replacing TARGET variable to develop and compile inside QtCreator.
File must live in source library path, where makefile is created by the SDK.

I tested it on direct AMD64 and cross ARM64, in 4.4 ARM 64Bit SL and 4.4.1 Linux SL and it's Working.

This is a base version of this file useful to start a new library.

I tested it with a C++ wrapper and many Qt Framework direct call from runtime.
I also tested creating a QCoreApplication in a separated thread and tested it with Qt event loop.

QT += core
QT -= gui

TARGET = ADVExternalFunction
TEMPLATE = lib

DEFINES += $${upper($$TARGET)}_LIBRARY
DEFINES += DEP_H=\\\"$${TARGET}Dep.h\\\"

CONFIG += $$lower($$TARGET)_lib
QMAKE_LFLAGS += -rdynamic
QMAKE_CFLAGS += -c -fPIC -g -O0 -Wall -Wextra -Wno-unused -DDEP_H="$${TARGET}Dep.h"

system(m4 -I$$PWD/../ExtensionSDK/m4 Exports.m4 - < $${TARGET}Itf.m4 > out/$${TARGET}Itf.h)

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

INCLUDEPATH += out/ \
               ../ExtensionSDK/include

SOURCES += \
    ../ExtensionSDK/src/CmpFrame.c \
    $${TARGET}.c

HEADERS += \
    out/$${TARGET}Dep.h
 
πŸ‘
1