Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Configure Qt Creator for not to run qmake
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Configure Qt Creator for not to run qmake

Scheduled Pinned Locked Moved General and Desktop
18 Posts 3 Posters 5.9k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kumararajas
    wrote on last edited by kumararajas
    #1

    Hello,

    I have written a make file by myself. So, I do not want qmake to create a Makefile.

    But every time, when I say "build" it overwrites the Makefile that I have created.

    How can I stop this behaviour?

    My expectation is, when I say "build" it shall run the Makefile that I have created.

    Thanks!

    --Kumara

    --Kumar

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you have a .pro file for your project ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you have a .pro file for your project ?

        K Offline
        K Offline
        kumararajas
        wrote on last edited by
        #3

        @SGaist Yes I do have a pro file.

        --Kumar

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          In that case, why the separated Makefile ? Do you need anything special that you can't generate from a .pro file ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          K 1 Reply Last reply
          0
          • SGaistS SGaist

            In that case, why the separated Makefile ? Do you need anything special that you can't generate from a .pro file ?

            K Offline
            K Offline
            kumararajas
            wrote on last edited by
            #5

            @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.

            --Kumar

            JKSHJ 1 Reply Last reply
            0
            • K kumararajas

              @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.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @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.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              K 1 Reply Last reply
              0
              • JKSHJ JKSH

                @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.

                K Offline
                K Offline
                kumararajas
                wrote on last edited by
                #7

                @JKSH

                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

                --Kumar

                JKSHJ 1 Reply Last reply
                0
                • K kumararajas

                  @JKSH

                  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

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  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:

                  1. Set up an appropriate Kit in Qt Creator: http://doc.qt.io/qtcreator/creator-targets.html, and then
                  2. Use this Kit to build your UI application.

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  K 1 Reply Last reply
                  0
                  • JKSHJ JKSH

                    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:

                    1. Set up an appropriate Kit in Qt Creator: http://doc.qt.io/qtcreator/creator-targets.html, and then
                    2. Use this Kit to build your UI application.
                    K Offline
                    K Offline
                    kumararajas
                    wrote on last edited by
                    #9

                    @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?

                    --Kumar

                    JKSHJ 1 Reply Last reply
                    0
                    • K kumararajas

                      @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?

                      JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on last edited by
                      #10

                      @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/

                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        Can you share the environment setup that your Makefile does ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        K 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Can you share the environment setup that your Makefile does ?

                          K Offline
                          K Offline
                          kumararajas
                          wrote on last edited by
                          #12

                          @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
                          

                          --Kumar

                          K 1 Reply Last reply
                          0
                          • K kumararajas

                            @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
                            
                            K Offline
                            K Offline
                            kumararajas
                            wrote on last edited by
                            #13

                            @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/
                            

                            --Kumar

                            K 1 Reply Last reply
                            0
                            • K kumararajas

                              @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/
                              
                              K Offline
                              K Offline
                              kumararajas
                              wrote on last edited by
                              #14

                              @kumararajas ui_defs.mk file, sets the environment path.

                              And my Makefile calls qmake and generates Makefile_g using the environment set.

                              --Kumar

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                Did you try editing the Build Environment to match what you have in your ui_dfs.mk ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                K 1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  Did you try editing the Build Environment to match what you have in your ui_dfs.mk ?

                                  K Offline
                                  K Offline
                                  kumararajas
                                  wrote on last edited by
                                  #16

                                  @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.

                                  --Kumar

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    kumararajas
                                    wrote on last edited by
                                    #17

                                    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

                                    --Kumar

                                    1 Reply Last reply
                                    2
                                    • JKSHJ Offline
                                      JKSHJ Offline
                                      JKSH
                                      Moderators
                                      wrote on last edited by
                                      #18

                                      Great, thanks for sharing your solution!

                                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                      1 Reply Last reply
                                      0

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved