[SOLVED] Configure Qt Creator for not to run qmake
-
@SGaist That's right!
I have some more contents in the Makefile for my system needs.
That's why I don't want to generate Makefile from .pro file.
@kumararajas said:
I have some more contents in the Makefile for my system needs.
That's why I don't want to generate Makefile from .pro file.
What are those contents? You might be able to ask qmake to generate them for you automatically.
-
@kumararajas said:
I have some more contents in the Makefile for my system needs.
That's why I don't want to generate Makefile from .pro file.
What are those contents? You might be able to ask qmake to generate them for you automatically.
My bad with unclarity message.
With respect to TI AM335x SDK, we should run a script "environment-setup" that sets up the environment for cross compilation.
To do this process systematically, I need someone to do this process before running "qmake" and generate pro file.
So, I have written a Makefile, that setup the environment first and then runs qmake and generates Makefile (In a different name, just not to overwrite). And then run the generated Makefile.
There is an another way to set all these environment variables at user level, but I don't want to do that. Because, these path required only while cross compiling the UI application.
That's the reason that I have done this in a Makefile, which sets the variables with the values and goes off after execution.
Please let me know if I have conveyed correctly or not.
Thanks,
Kumara -
My bad with unclarity message.
With respect to TI AM335x SDK, we should run a script "environment-setup" that sets up the environment for cross compilation.
To do this process systematically, I need someone to do this process before running "qmake" and generate pro file.
So, I have written a Makefile, that setup the environment first and then runs qmake and generates Makefile (In a different name, just not to overwrite). And then run the generated Makefile.
There is an another way to set all these environment variables at user level, but I don't want to do that. Because, these path required only while cross compiling the UI application.
That's the reason that I have done this in a Makefile, which sets the variables with the values and goes off after execution.
Please let me know if I have conveyed correctly or not.
Thanks,
KumaraHi,
@kumararajas said:
With respect to TI AM335x SDK, we should run a script "environment-setup" that sets up the environment for cross compilation.
The standard way to set your environment is to:
- Set up an appropriate Kit in Qt Creator: http://doc.qt.io/qtcreator/creator-targets.html, and then
- Use this Kit to build your UI application.
-
Hi,
@kumararajas said:
With respect to TI AM335x SDK, we should run a script "environment-setup" that sets up the environment for cross compilation.
The standard way to set your environment is to:
- Set up an appropriate Kit in Qt Creator: http://doc.qt.io/qtcreator/creator-targets.html, and then
- Use this Kit to build your UI application.
@JKSH said:
The standard way to set your environment is to:
As I have mentioned, I have written my Makefile, which will set the environment and that works good when I build from command line.
I would like to run my make file from Qt Creator as well.
I understand the standard way that you explained.
Is there a possibility for doing the above said?
-
@JKSH said:
The standard way to set your environment is to:
As I have mentioned, I have written my Makefile, which will set the environment and that works good when I build from command line.
I would like to run my make file from Qt Creator as well.
I understand the standard way that you explained.
Is there a possibility for doing the above said?
@kumararajas said:
Is there a possibility for doing the above said?
Hmm... I don't think so, unfortunately.
If you want, you can submit a feature request to https://bugreports.qt.io/
-
Can you share the environment setup that your Makefile does ?
-
@SGaist Sure. Here is how my Makefile look like:
################################################################################# # INCLUDES ################################################################################# include $(ROOT)/build/ui_defs.mk ################################################################################# # TARGETS ################################################################################# # Target 'all' to build the UI Application and deploy by coping the files to right location # More of incremental build all: uibuilder deploy # Clean build of UI Application cleanbuild: clean all # Calls qmake and creates Makefile and then execute them. uibuilder: $(QMAKEPATH)qmake -o Makefile_g $(QMAKESPEC_SWITCH) $(QMAKESPEC) $(PRO_FILE_NAME) make -f Makefile_g # Remove the object files, mock files, and generated Makefiles clean: rm -rf generated_files/ rm -f Makefile_g rm -f devapp/Makefile_g rm -f uicorelib/Makefile_g
-
@SGaist Sure. Here is how my Makefile look like:
################################################################################# # INCLUDES ################################################################################# include $(ROOT)/build/ui_defs.mk ################################################################################# # TARGETS ################################################################################# # Target 'all' to build the UI Application and deploy by coping the files to right location # More of incremental build all: uibuilder deploy # Clean build of UI Application cleanbuild: clean all # Calls qmake and creates Makefile and then execute them. uibuilder: $(QMAKEPATH)qmake -o Makefile_g $(QMAKESPEC_SWITCH) $(QMAKESPEC) $(PRO_FILE_NAME) make -f Makefile_g # Remove the object files, mock files, and generated Makefiles clean: rm -rf generated_files/ rm -f Makefile_g rm -f devapp/Makefile_g rm -f uicorelib/Makefile_g
@kumararajas This is how my ui_defs.mk file looks like
export SDK_PATH=/usr/local/etc/g-cpu/sdk/linux-devkit export SDK_SYS=i686-arago-linux export REAL_MULTIMACH_TARGET_SYS=cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi export TOOLCHAIN_SYS=arm-linux-gnueabihf export TOOLCHAIN_PREFIX=$(TOOLCHAIN_SYS)- export SDK_PATH_NATIVE=$(SDK_PATH)/sysroots/$(SDK_SYS) export SDK_PATH_TARGET=$(SDK_PATH)/sysroots/$(REAL_MULTIMACH_TARGET_SYS) export PKG_CONFIG_SYSROOT_DIR=$(SDK_PATH_TARGET) export PKG_CONFIG_PATH=$(SDK_PATH_TARGET)/usr/lib/pkgconfig export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export CONFIG_SITE=$(SDK_PATH)/site-config-$(REAL_MULTIMACH_TARGET_SYS) export CC=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)gcc export CXX=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)g++ export GDB=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)gdb export CPP=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)gcc -E export NM=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)nm export AS=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)as export AR=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)ar export RANLIB=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)ranlib export OBJCOPY=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)objcopy export OBJDUMP=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)objdump export STRIP=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)strip export CONFIGURE_FLAGS=--target=arm-oe-linux-gnueabi --host=arm-oe-linux-gnueabi --build=i686-linux --with-libtool-sysroot=$(SDK_PATH_TARGET) export CPPFLAGS= -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=$(SDK_PATH_TARGET) export CFLAGS=$(CPPFLAGS) export CXXFLAGS=$(CPPFLAGS) export LDFLAGS= --sysroot=$(SDK_PATH_TARGET) export OECORE_NATIVE_SYSROOT=$(SDK_PATH_NATIVE) export OECORE_TARGET_SYSROOT=$(SDK_PATH_TARGET) export OECORE_ACLOCAL_OPTS=-I $(SDK_PATH_NATIVE)/usr/share/aclocal export OECORE_DISTRO_VERSION=2013.12 export OECORE_SDK_VERSION=2013.12 export OE_QMAKE_CFLAGS=$(CFLAGS) export OE_QMAKE_CXXFLAGS=$(CXXFLAGS) export OE_QMAKE_LDFLAGS=$(LDFLAGS) export OE_QMAKE_CC=$(CC) export OE_QMAKE_CXX=$(CXX) export OE_QMAKE_LINK=$(CXX) export OE_QMAKE_AR=$(AR) export OE_QMAKE_LIBDIR_QT=$(SDK_PATH_TARGET)/usr/lib export OE_QMAKE_INCDIR_QT=$(SDK_PATH_TARGET)/usr/include/qtopia export OE_QMAKE_HOST_BINDIR_QT=$(SDK_PATH_NATIVE)/usr/bin/ export OE_QMAKE_MOC=$(SDK_PATH_NATIVE)/usr/bin/moc4 export OE_QMAKE_UIC=$(SDK_PATH_NATIVE)/usr/bin/uic4 export OE_QMAKE_UIC3=$(SDK_PATH_NATIVE)/usr/bin/uic34 export OE_QMAKE_RCC=$(SDK_PATH_NATIVE)/usr/bin/rcc4 export OE_QMAKE_QDBUSCPP2XML=$(SDK_PATH_NATIVE)/usr/bin/qdbuscpp2xml4 export OE_QMAKE_QDBUSXML2CPP=$(SDK_PATH_NATIVE)/usr/bin/qdbusxml2cpp4 export OE_QMAKE_QT_CONFIG=$(SDK_PATH_TARGET)/usr/share/qtopia/mkspecs/qconfig.pri export OE_QMAKE_STRIP=echo export QMAKESPEC=$(SDK_PATH_TARGET)/usr/share/qtopia/mkspecs/linux-gnueabi-oe-g++ export QMAKESPEC_SWITCH=-spec export QMAKE_DEFAULT_LIBDIRS=${QT_QMAKE_LIBDIR_QT} export QMAKE_DEFAULT_INCDIRS=${QT_QMAKE_INCDIR_QT} export PS1="\[\e[32;1m\][linux-devkit]\[\e[0m\]:\w> " export QMAKE_PATH=$(SDK_PATH_NATIVE)/usr/bin/
-
@kumararajas This is how my ui_defs.mk file looks like
export SDK_PATH=/usr/local/etc/g-cpu/sdk/linux-devkit export SDK_SYS=i686-arago-linux export REAL_MULTIMACH_TARGET_SYS=cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi export TOOLCHAIN_SYS=arm-linux-gnueabihf export TOOLCHAIN_PREFIX=$(TOOLCHAIN_SYS)- export SDK_PATH_NATIVE=$(SDK_PATH)/sysroots/$(SDK_SYS) export SDK_PATH_TARGET=$(SDK_PATH)/sysroots/$(REAL_MULTIMACH_TARGET_SYS) export PKG_CONFIG_SYSROOT_DIR=$(SDK_PATH_TARGET) export PKG_CONFIG_PATH=$(SDK_PATH_TARGET)/usr/lib/pkgconfig export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export CONFIG_SITE=$(SDK_PATH)/site-config-$(REAL_MULTIMACH_TARGET_SYS) export CC=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)gcc export CXX=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)g++ export GDB=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)gdb export CPP=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)gcc -E export NM=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)nm export AS=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)as export AR=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)ar export RANLIB=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)ranlib export OBJCOPY=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)objcopy export OBJDUMP=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)objdump export STRIP=$(SDK_PATH_NATIVE)/usr/bin/$(TOOLCHAIN_PREFIX)strip export CONFIGURE_FLAGS=--target=arm-oe-linux-gnueabi --host=arm-oe-linux-gnueabi --build=i686-linux --with-libtool-sysroot=$(SDK_PATH_TARGET) export CPPFLAGS= -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=$(SDK_PATH_TARGET) export CFLAGS=$(CPPFLAGS) export CXXFLAGS=$(CPPFLAGS) export LDFLAGS= --sysroot=$(SDK_PATH_TARGET) export OECORE_NATIVE_SYSROOT=$(SDK_PATH_NATIVE) export OECORE_TARGET_SYSROOT=$(SDK_PATH_TARGET) export OECORE_ACLOCAL_OPTS=-I $(SDK_PATH_NATIVE)/usr/share/aclocal export OECORE_DISTRO_VERSION=2013.12 export OECORE_SDK_VERSION=2013.12 export OE_QMAKE_CFLAGS=$(CFLAGS) export OE_QMAKE_CXXFLAGS=$(CXXFLAGS) export OE_QMAKE_LDFLAGS=$(LDFLAGS) export OE_QMAKE_CC=$(CC) export OE_QMAKE_CXX=$(CXX) export OE_QMAKE_LINK=$(CXX) export OE_QMAKE_AR=$(AR) export OE_QMAKE_LIBDIR_QT=$(SDK_PATH_TARGET)/usr/lib export OE_QMAKE_INCDIR_QT=$(SDK_PATH_TARGET)/usr/include/qtopia export OE_QMAKE_HOST_BINDIR_QT=$(SDK_PATH_NATIVE)/usr/bin/ export OE_QMAKE_MOC=$(SDK_PATH_NATIVE)/usr/bin/moc4 export OE_QMAKE_UIC=$(SDK_PATH_NATIVE)/usr/bin/uic4 export OE_QMAKE_UIC3=$(SDK_PATH_NATIVE)/usr/bin/uic34 export OE_QMAKE_RCC=$(SDK_PATH_NATIVE)/usr/bin/rcc4 export OE_QMAKE_QDBUSCPP2XML=$(SDK_PATH_NATIVE)/usr/bin/qdbuscpp2xml4 export OE_QMAKE_QDBUSXML2CPP=$(SDK_PATH_NATIVE)/usr/bin/qdbusxml2cpp4 export OE_QMAKE_QT_CONFIG=$(SDK_PATH_TARGET)/usr/share/qtopia/mkspecs/qconfig.pri export OE_QMAKE_STRIP=echo export QMAKESPEC=$(SDK_PATH_TARGET)/usr/share/qtopia/mkspecs/linux-gnueabi-oe-g++ export QMAKESPEC_SWITCH=-spec export QMAKE_DEFAULT_LIBDIRS=${QT_QMAKE_LIBDIR_QT} export QMAKE_DEFAULT_INCDIRS=${QT_QMAKE_INCDIR_QT} export PS1="\[\e[32;1m\][linux-devkit]\[\e[0m\]:\w> " export QMAKE_PATH=$(SDK_PATH_NATIVE)/usr/bin/
@kumararajas ui_defs.mk file, sets the environment path.
And my Makefile calls qmake and generates Makefile_g using the environment set.
-
Did you try editing the Build Environment to match what you have in your ui_dfs.mk ?
-
@SGaist said:
Did you try editing the Build Environment to match what you have in your ui_dfs.mk ?
To some extent, but not fully. I just took "environment_setup" script and modifed some of the details by myself to match the build environment.
-
Alright, I found the solution by myself.
That's by disabling the default build steps and adding custom build step for "Make".
For /usr/bin/make command, I pass the argument to my own Makefile with the appropriate parameters.
And it works cool for me!--Kumara
-
Great, thanks for sharing your solution!