I am using yocto build. I have .pro files and recipes(.bb) which build all cpp files present in .pro file. Recently I added two new cpp file i.e. gtest_main.cpp and lgeplugin_Test.cpp in .pro file. As show below
lgeplugin.pro
QMAKE_CXXFLAGS += -g
QMAKE_CFLAGS += -g
CFLAGS += \
-Wall \
-Wextra \
-fPIC \
-std=c++11
TARGET = lgeplugin
TEMPLATE = lib
message(Building)
INCLUDEPATH += ${Root}/include/ALL \
${Root}/include/gtest \
DEFINES += USE_LGE_TREE
SOURCES += ../../src/lgeplugin.cpp
contains(DEFINES, LGE_PLUGIN) {
SOURCES += \
../../src/internalclient.cpp \
../../src/Event.cpp \
../../src/gtest_main.cpp \
../../src/lgeplugin_Test.cpp
LIBS += -lLGEFramework -lgtest
}
lgeplugin.bb
QMAKE_PROFILES = "${S}/lgeplugin.pro"
do_install() {
install -d ${D}/usr/lib
cp -a ${B}/liblgeplugin.so* ${D}/usr/lib
}
Requirement : I need executable(a.out) of the newly added file i.e. gtest_main.cpp and lgeplugin_Test.cpp