Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [qmake] custom build tool, how???
Forum Updated to NodeBB v4.3 + New Features

[qmake] custom build tool, how???

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 937 Views 1 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.
  • N Offline
    N Offline
    nen777w
    wrote on last edited by
    #1

    Hi!
    I need to run custom build tool before compile the project sources.
    I read the documentation and made the folowing changes in my *.pro file:

    @contains(QMAKE_HOST.arch, x86_64) { #x64
    #insert code
    } else {
    ASM_S_STUB_SRC = ./../libffi-3.0.13/src/x86/win32.S
    create_asm_stub.input = ASM_S_STUB_SRC
    create_asm_stub.output = $${OBJECTS_DIR}/${QMAKE_FILE_BASE}.asm
    create_asm_stub.commands = cl.exe /EP /D "X86_WIN32" /I . /I ../includes /I ../libffi-3.0.13/include /I ../libffi-3.0.13/src ${QMAKE_FILE_IN} > $$create_asm_stub.output
    create_asm_stub.CONFIG = no_link

        QMAKE_EXTRA_COMPILERS += create_asm_stub
        PRE_TARGETDEPS += create_asm_stub
    

    @

    But, when I run project to build I get the following error:
    00:27:00: Starting: "C:\Qt\qtcreator-2.8.0\bin\jom.exe"
    C:\Qt\qtcreator-2.8.0\bin\jom.exe -f Makefile.Debug
    Error: dependent 'create_asm_stub' does not exist.--

    Ok! I'm go to the Make file and find that this rule named as compiler_create_asm_stub_make_all
    Then I change the qmake file
    @PRE_TARGETDEPS += compiler_create_asm_stub_make_all@

    and run build again.
    And at this time it work!

    But I'm not sure that is the correct and right way!
    Please correct me.

    Thanks.

    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