# HG changeset patch # User Sebastien Jodogne # Date 1570548207 -7200 # Node ID 95939fa925f6a7b1a329237cc872757882e041c8 # Parent 14c0a29cd9ec562fa483caf64762f6da74980e37 LinuxStandardBaseUic.py diff -r 14c0a29cd9ec -r 95939fa925f6 Resources/CMake/LinuxStandardBaseUic.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Resources/CMake/LinuxStandardBaseUic.py Tue Oct 08 17:23:27 2019 +0200 @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +import subprocess +import sys + +if len(sys.argv) <= 1: + sys.stderr.write('Please provide arguments for uic\n') + sys.exit(-1) + +path = '' +pos = 1 +while pos < len(sys.argv): + if sys.argv[pos].startswith('-'): + pos += 2 + else: + path = sys.argv[pos] + break + +if len(path) == 0: + sys.stderr.write('Unable to find the input file in the arguments to uic\n') + sys.exit(-1) + +with open(path, 'r') as f: + lines = f.read().split('\n') + if (len(lines) > 1 and + lines[0].startswith('" + # header that is automatically added by Qt Creator + set(QT_UIC_EXECUTABLE ${CMAKE_CURRENT_LIST_DIR}/LinuxStandardBaseUic.py) + set(QT_MOC_EXECUTABLE ${LSB_PATH}/bin/moc) include_directories(