Codebase list mozc / d003076
Unsupport static Qt libraries on Linux To make Qt 5 migration process easier, we decided to drop the configuration to statically link to Qt libraries on Linux. BUG=#327 TEST= REF_BUG=26887740 REF_CL=113928643 REF_TIME=2016-02-05T18:21:55+09:00 REF_TIME_RAW=1454664115 +0900 Hiroyuki Komatsu 8 years ago
6 changed file(s) with 36 addition(s) and 50 deletion(s). Raw diff Collapse all Expand all
338338 parser.add_option('--gypdir', dest='gypdir',
339339 help='Specifies the location of GYP to be used.')
340340 parser.add_option('--noqt', action='store_true', dest='noqt', default=False)
341 parser.add_option('--qtdir', dest='qtdir',
342 default=os.getenv('QTDIR', None),
343 help='Qt base directory to be used.')
344341 parser.add_option('--version_file', dest='version_file',
345342 help='use the specified version template file',
346343 default='mozc_version_template.txt')
450447 # as follows.
451448 parser.add_option('--msvs_version', dest='msvs_version', default='2013',
452449 help='Specifies the target MSVS version.')
450
451 if IsWindows() or IsMac():
452 parser.add_option('--qtdir', dest='qtdir',
453 default=os.getenv('QTDIR', None),
454 help='Qt base directory to be used.')
453455
454456 return parser.parse_args(args, values)
455457
672674
673675 if options.noqt or target_platform in ['Android', 'NaCl']:
674676 gyp_options.extend(['-D', 'use_qt=NO'])
677 gyp_options.extend(['-D', 'qt_dir='])
678 elif options.target_platform == 'Linux':
679 gyp_options.extend(['-D', 'use_qt=YES'])
680 gyp_options.extend(['-D', 'qt_dir='])
681
682 # Check if Qt libraries are installed.
683 system_qt_found = PkgExists('QtCore >= 4.0', 'QtCore < 5.0',
684 'QtGui >= 4.0', 'QtGui < 5.0')
685 if not system_qt_found:
686 PrintErrorAndExit('Qt4 is required to build GUI Tool. '
687 'Specify --noqt to skip building GUI Tool.')
675688 else:
676 if options.target_platform == 'Linux' and not options.qtdir:
677 # Check if Qt libraries are installed.
678 system_qt_found = PkgExists('QtCore >= 4.0', 'QtCore < 5.0',
679 'QtGui >= 4.0', 'QtGui < 5.0')
680 if not system_qt_found:
681 PrintErrorAndExit('Qt4 is required to build GUI Tool. '
682 'Specify --noqt to skip building GUI Tool.')
683689 gyp_options.extend(['-D', 'use_qt=YES'])
684 if options.qtdir:
685 gyp_options.extend(['-D', 'qt_dir=%s' % os.path.abspath(options.qtdir)])
686 else:
687 gyp_options.extend(['-D', 'qt_dir='])
690 if options.qtdir:
691 gyp_options.extend(['-D', 'qt_dir=%s' % os.path.abspath(options.qtdir)])
692 else:
693 gyp_options.extend(['-D', 'qt_dir='])
688694
689695 if options.target_platform == 'Windows' and options.wix_dir:
690696 gyp_options.extend(['-D', 'use_wix=YES'])
3535
3636 'variables': {
3737 'conditions': [
38 ['qt_dir', {
38 ['target_platform=="Linux"', {
39 'qt_cflags': ['<!@(pkg-config --cflags QtGui QtCore)'],
40 'qt_include_dirs': [],
41 }, 'qt_dir', {
3942 'qt_cflags': [],
4043 'qt_include_dirs': ['<(qt_dir)/include'],
41 }, 'target_platform=="Linux"', {
42 'qt_cflags': ['<!@(pkg-config --cflags QtGui QtCore)'],
43 'qt_include_dirs': [],
4444 }, {
4545 'qt_cflags': [],
4646 'qt_include_dirs': [],
109109 ]
110110 }],
111111 ['target_platform=="Linux"', {
112 'conditions': [
113 ['qt_dir', {
114 'libraries': [
115 '-L<(qt_dir)/lib',
116 '-lQtGui',
117 '-lQtCore',
118 # Supposing Qt libraries in qt_dir will be built as static libraries
119 # without support of pkg-config, we need to list all the
120 # dependencies of QtGui.
121 # See http://doc.qt.nokia.com/4.7/requirements-x11.html
122 # pthread library is removed because it must not be specific to Qt.
123 '<!@(pkg-config --libs-only-L --libs-only-l'
124 ' xrender xrandr xcursor xfixes xinerama fontconfig freetype2'
125 ' xi xt xext x11'
126 ' sm ice'
127 ' gobject-2.0)',
128 ],
129 }, {
130 'libraries': [
131 '<!@(pkg-config --libs QtGui QtCore)',
132 ],
133 }],
112 'libraries': [
113 '<!@(pkg-config --libs QtGui QtCore)',
134114 ],
135115 }],
136116 # Workarounds related with clang.
3232
3333 'variables': {
3434 'conditions': [
35 ['qt_dir', {
35 ['target_platform=="Linux"', {
36 'moc_path': '<!(pkg-config --variable=moc_location QtGui)',
37 }, 'qt_dir', {
3638 'moc_path': '<(qt_dir)/bin/moc<(EXECUTABLE_SUFFIX)',
37 }, 'target_platform=="Linux"', {
38 'moc_path': '<!(pkg-config --variable=moc_location QtGui)',
3939 }, {
4040 'moc_path': 'moc<(EXECUTABLE_SUFFIX)',
4141 }],
3232
3333 'variables': {
3434 'conditions': [
35 ['qt_dir', {
36 'rcc_path': '<(qt_dir)/bin/rcc<(EXECUTABLE_SUFFIX)',
37 }, 'target_platform=="Linux"', {
35 ['target_platform=="Linux"', {
3836 # seems that --variable=rcc_location is not supported
3937 'rcc_path': '<!(pkg-config --variable=exec_prefix QtGui)/bin/rcc',
38 }, 'qt_dir', {
39 'rcc_path': '<(qt_dir)/bin/rcc<(EXECUTABLE_SUFFIX)',
4040 }, {
4141 'rcc_path': 'rcc<(EXECUTABLE_SUFFIX)',
4242 }],
3232
3333 'variables': {
3434 'conditions': [
35 ['qt_dir', {
35 ['target_platform=="Linux"', {
36 'uic_path': '<!(pkg-config --variable=uic_location QtGui)',
37 }, 'qt_dir', {
3638 'uic_path': '<(qt_dir)/bin/uic<(EXECUTABLE_SUFFIX)',
37 }, 'target_platform=="Linux"', {
38 'uic_path': '<!(pkg-config --variable=uic_location QtGui)',
3939 }, {
4040 'uic_path': 'uic<(EXECUTABLE_SUFFIX)',
4141 }],
00 MAJOR=2
11 MINOR=17
2 BUILD=2442
2 BUILD=2443
33 REVISION=102
44 # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
55 # downloaded by NaCl Mozc.