MOC Compiler does not read Visual Studio Variables like $(ProjectName)

  • Hello i am having trouble to integrate the moc compiler of Qt 4.8 into visual studio 2010. The general idea about Visual Studio variables is to use them as often to make a better project code and reduce maintenance. Unfortunately the moc compiler does not read any of these variables. The result is that it may generate its files in wrong directories.
    Example Project File:
    ARCHITECTURE_PATH = msw/vc/$${LITERAL_DOLLAR}(PlatformToolset)/$${LITERAL_DOLLAR}(PlatformName)/$${LITERAL_DOLLAR}(Configuration)
    What should it generate? (To follow the VS rules)
    Win32 + Debug + VS2010 = msw/vc/v100/Win32/Debug
    Win64 + Release + VS2011 = msw/vc/v110/x64/Release
    One Code to rule them (configurations) all !!! But sadly not with MOC :(
    The result of the moc compiler will be everytime: "msw/vc" and nothing more. This means i have to generate a new line for each difference, because i cannot use these variables.
    Any Idea how to solve this in a more smart way?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.