From b2b5e5ad55a44c4612f97c6036dc687b184c301e Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 12 May 2022 01:53:16 +0200 Subject: [PATCH] Modifications to enable building of Qt-less canvas in setup.py --- setup.py | 188 +++++++++++++++++- src/ant/ant/ant.pro | 6 +- src/ant/ant/antConfigPage.cc | 3 + src/ant/ant/antConfigPage.h | 4 +- src/ant/ant/antForceLink.cc | 1 - src/ant/ant/antForceLink.h | 2 +- src/ant/ant/antPropertiesPage.cc | 2 + src/ant/ant/antPropertiesPage.h | 3 + src/edt/edt/edt.pro | 26 ++- src/edt/edt/edtDialogs.cc | 4 + src/edt/edt/edtDialogs.h | 3 + src/edt/edt/edtEditorOptionsPages.cc | 2 + src/edt/edt/edtEditorOptionsPages.h | 2 + src/edt/edt/edtForceLink.cc | 32 +++ src/edt/edt/edtForceLink.h | 40 ++++ src/edt/edt/edtInstPropertiesPage.cc | 2 + src/edt/edt/edtInstPropertiesPage.h | 2 + src/edt/edt/edtPCellParametersPage.cc | 3 +- src/edt/edt/edtPCellParametersPage.h | 3 + src/edt/edt/edtPropertiesPageUtils.cc | 2 + src/edt/edt/edtPropertiesPageUtils.h | 2 + src/edt/edt/edtPropertiesPages.cc | 2 + src/edt/edt/edtPropertiesPages.h | 3 + src/edt/edt/edtRecentConfigurationPage.cc | 4 + src/edt/edt/edtRecentConfigurationPage.h | 2 + src/img/img/img.pro | 6 +- src/img/img/imgForceLink.cc | 3 +- src/img/img/imgForceLink.h | 4 +- src/img/img/imgLandmarksDialog.cc | 2 + src/img/img/imgLandmarksDialog.h | 3 + src/img/img/imgNavigator.cc | 2 + src/img/img/imgNavigator.h | 2 + src/img/img/imgPropertiesPage.cc | 2 + src/img/img/imgPropertiesPage.h | 3 + src/img/img/imgWidgets.cc | 3 + src/img/img/imgWidgets.h | 3 + src/laybasic/laybasic/gsiDeclLayDialogs.cc | 4 + src/laybasic/laybasic/gsiDeclLayMenu.cc | 3 + .../gsiDeclLayNetlistBrowserDialog.cc | 5 +- src/laybasic/laybasic/gsiDeclLayStream.cc | 3 + src/laybasic/laybasic/gtf.cc | 2 + src/laybasic/laybasic/gtf.h | 4 +- src/laybasic/laybasic/gtfdummy.cc | 2 + src/laybasic/laybasic/layAbstractMenu.cc | 3 + src/laybasic/laybasic/layAbstractMenu.h | 3 +- .../laybasic/layBackgroundAwareTreeStyle.cc | 5 + .../laybasic/layBackgroundAwareTreeStyle.h | 2 + src/laybasic/laybasic/layBitmap.h | 3 - src/laybasic/laybasic/layBookmarkList.cc | 3 + src/laybasic/laybasic/layBookmarkList.h | 2 + .../laybasic/layBookmarkManagementForm.cc | 3 +- .../laybasic/layBookmarkManagementForm.h | 2 + src/laybasic/laybasic/layBookmarksView.cc | 3 + src/laybasic/laybasic/layBookmarksView.h | 2 + .../laybasic/layBrowseInstancesForm.cc | 3 + .../laybasic/layBrowseInstancesForm.h | 2 + src/laybasic/laybasic/layBrowseShapesForm.cc | 3 + src/laybasic/laybasic/layBrowseShapesForm.h | 2 + src/laybasic/laybasic/layBrowser.cc | 3 + src/laybasic/laybasic/layBrowser.h | 2 + src/laybasic/laybasic/layBrowserDialog.cc | 3 + src/laybasic/laybasic/layBrowserDialog.h | 2 + src/laybasic/laybasic/layBrowserPanel.cc | 2 + src/laybasic/laybasic/layBrowserPanel.h | 2 + src/laybasic/laybasic/layBusy.cc | 4 + src/laybasic/laybasic/layBusy.h | 3 + src/laybasic/laybasic/layCellSelectionForm.cc | 3 +- src/laybasic/laybasic/layCellSelectionForm.h | 2 + src/laybasic/laybasic/layCellTreeModel.cc | 4 + src/laybasic/laybasic/layCellTreeModel.h | 2 + src/laybasic/laybasic/layColor.h | 1 - .../laybasic/layConfigurationDialog.cc | 2 + .../laybasic/layConfigurationDialog.h | 2 + src/laybasic/laybasic/layCursor.cc | 2 + src/laybasic/laybasic/layCursor.h | 7 +- src/laybasic/laybasic/layDialogs.cc | 2 + src/laybasic/laybasic/layDialogs.h | 3 +- src/laybasic/laybasic/layDragDropData.cc | 4 + src/laybasic/laybasic/layDragDropData.h | 3 + .../laybasic/layEditLineStyleWidget.cc | 2 + .../laybasic/layEditLineStyleWidget.h | 3 + .../laybasic/layEditLineStylesForm.cc | 3 +- src/laybasic/laybasic/layEditLineStylesForm.h | 2 + src/laybasic/laybasic/layEditStippleWidget.cc | 2 + src/laybasic/laybasic/layEditStippleWidget.h | 2 + src/laybasic/laybasic/layEditStipplesForm.cc | 3 +- src/laybasic/laybasic/layEditStipplesForm.h | 2 + .../laybasic/layEditorOptionsFrame.cc | 4 + src/laybasic/laybasic/layEditorOptionsFrame.h | 4 + src/laybasic/laybasic/layEditorOptionsPage.cc | 3 + src/laybasic/laybasic/layEditorOptionsPage.h | 4 + .../laybasic/layEditorOptionsPages.cc | 2 + src/laybasic/laybasic/layEditorOptionsPages.h | 2 + src/laybasic/laybasic/layFileDialog.cc | 2 + src/laybasic/laybasic/layFileDialog.h | 2 + .../laybasic/layGenericSyntaxHighlighter.cc | 3 +- .../laybasic/layGenericSyntaxHighlighter.h | 2 + src/laybasic/laybasic/layGridNetConfigPage.cc | 2 + src/laybasic/laybasic/layGridNetConfigPage.h | 2 + .../laybasic/layHierarchyControlPanel.cc | 3 + .../laybasic/layHierarchyControlPanel.h | 2 + .../laybasic/layIndexedNetlistModel.cc | 3 + .../laybasic/layIndexedNetlistModel.h | 3 + src/laybasic/laybasic/layItemDelegates.cc | 4 + src/laybasic/laybasic/layItemDelegates.h | 4 + src/laybasic/laybasic/layLayerControlPanel.cc | 3 + src/laybasic/laybasic/layLayerControlPanel.h | 2 + .../laybasic/layLayerMappingWidget.cc | 2 + src/laybasic/laybasic/layLayerMappingWidget.h | 2 + src/laybasic/laybasic/layLayerToolbox.cc | 2 + src/laybasic/laybasic/layLayerToolbox.h | 2 + src/laybasic/laybasic/layLayerTreeModel.cc | 3 + src/laybasic/laybasic/layLayerTreeModel.h | 2 + src/laybasic/laybasic/layLayoutCanvas.h | 1 + .../laybasic/layLayoutPropertiesForm.cc | 4 +- .../laybasic/layLayoutPropertiesForm.h | 2 + .../laybasic/layLayoutStatisticsForm.cc | 4 +- .../laybasic/layLayoutStatisticsForm.h | 2 + .../laybasic/layLayoutViewConfigPages.cc | 2 + .../laybasic/layLayoutViewConfigPages.h | 2 + .../laybasic/layLayoutViewFunctions.cc | 4 + .../laybasic/layLayoutViewFunctions.h | 2 + src/laybasic/laybasic/layLibrariesView.cc | 3 + src/laybasic/laybasic/layLibrariesView.h | 2 + .../laybasic/layLoadLayoutOptionsDialog.cc | 3 +- .../laybasic/layLoadLayoutOptionsDialog.h | 3 +- src/laybasic/laybasic/layNetExportDialog.cc | 4 + src/laybasic/laybasic/layNetExportDialog.h | 2 + src/laybasic/laybasic/layNetInfoDialog.cc | 4 + src/laybasic/laybasic/layNetInfoDialog.h | 2 + src/laybasic/laybasic/layNetlistBrowser.cc | 2 + src/laybasic/laybasic/layNetlistBrowser.h | 2 + .../laybasic/layNetlistBrowserDialog.cc | 2 + .../laybasic/layNetlistBrowserDialog.h | 2 + .../laybasic/layNetlistBrowserModel.cc | 2 + .../laybasic/layNetlistBrowserModel.h | 2 + .../laybasic/layNetlistBrowserPage.cc | 2 + src/laybasic/laybasic/layNetlistBrowserPage.h | 2 + .../laybasic/layNetlistBrowserTreeModel.cc | 3 + .../laybasic/layNetlistBrowserTreeModel.h | 2 + .../laybasic/layNetlistCrossReferenceModel.cc | 3 + .../laybasic/layNetlistCrossReferenceModel.h | 3 + src/laybasic/laybasic/layPluginConfigPage.cc | 3 + src/laybasic/laybasic/layPluginConfigPage.h | 2 + src/laybasic/laybasic/layProperties.cc | 2 + src/laybasic/laybasic/layProperties.h | 2 + src/laybasic/laybasic/layPropertiesDialog.cc | 2 + src/laybasic/laybasic/layPropertiesDialog.h | 2 + src/laybasic/laybasic/layQtTools.cc | 2 + src/laybasic/laybasic/layQtTools.h | 2 + .../laybasic/layRedrawThreadWorker.cc | 1 + .../laybasic/laySaveLayoutOptionsDialog.cc | 2 + .../laybasic/laySaveLayoutOptionsDialog.h | 2 + .../laybasic/laySelectCellViewForm.cc | 2 + src/laybasic/laybasic/laySelectCellViewForm.h | 2 + .../laybasic/laySelectLineStyleForm.cc | 3 +- .../laybasic/laySelectLineStyleForm.h | 2 + src/laybasic/laybasic/laySelectStippleForm.cc | 3 +- src/laybasic/laybasic/laySelectStippleForm.h | 2 + src/laybasic/laybasic/layStream.cc | 2 + src/laybasic/laybasic/layStream.h | 2 + src/laybasic/laybasic/layTechnology.cc | 3 + src/laybasic/laybasic/layTechnology.h | 2 + src/laybasic/laybasic/layTipDialog.cc | 2 + src/laybasic/laybasic/layTipDialog.h | 2 + src/laybasic/laybasic/layWidgets.cc | 3 + src/laybasic/laybasic/layWidgets.h | 2 + src/laybasic/laybasic/laybasic.pro | 16 +- src/laybasic/laybasic/laybasicConfig.h | 2 - src/laybasic/laybasic/laybasicForceLink.cc | 32 +++ src/laybasic/laybasic/laybasicForceLink.h | 40 ++++ src/laybasic/laybasic/rdbInfoWidget.cc | 3 + src/laybasic/laybasic/rdbInfoWidget.h | 3 +- src/laybasic/laybasic/rdbMarkerBrowser.cc | 3 +- src/laybasic/laybasic/rdbMarkerBrowser.h | 2 + .../laybasic/rdbMarkerBrowserDialog.cc | 2 + .../laybasic/rdbMarkerBrowserDialog.h | 2 + src/laybasic/laybasic/rdbMarkerBrowserPage.cc | 2 + src/laybasic/laybasic/rdbMarkerBrowserPage.h | 2 + src/lym/lym/lymForceLink.cc | 32 +++ src/lym/lym/lymForceLink.h | 40 ++++ src/pymod/__init__.py.qtless | 2 +- src/pymod/ant/ant.pro | 12 ++ src/pymod/ant/antMain.cc | 28 +++ .../distutils_src/klayout/lay/__init__.py | 12 ++ src/pymod/edt/edt.pro | 12 ++ src/pymod/edt/edtMain.cc | 28 +++ src/pymod/edt/lay.pro | 12 ++ src/pymod/edt/layMain.cc | 37 ++++ src/pymod/img/img.pro | 12 ++ src/pymod/img/imgMain.cc | 28 +++ src/pymod/img/lay.pro | 12 ++ src/pymod/img/layMain.cc | 37 ++++ src/pymod/lay/layMain.cc | 13 +- src/pymod/lym/lym.pro | 12 ++ src/pymod/lym/lymMain.cc | 28 +++ src/pymod/pymod.pro | 7 +- 197 files changed, 1123 insertions(+), 63 deletions(-) create mode 100644 src/edt/edt/edtForceLink.cc create mode 100644 src/edt/edt/edtForceLink.h create mode 100644 src/laybasic/laybasic/laybasicForceLink.cc create mode 100644 src/laybasic/laybasic/laybasicForceLink.h create mode 100644 src/lym/lym/lymForceLink.cc create mode 100644 src/lym/lym/lymForceLink.h create mode 100644 src/pymod/ant/ant.pro create mode 100644 src/pymod/ant/antMain.cc create mode 100644 src/pymod/distutils_src/klayout/lay/__init__.py create mode 100644 src/pymod/edt/edt.pro create mode 100644 src/pymod/edt/edtMain.cc create mode 100644 src/pymod/edt/lay.pro create mode 100644 src/pymod/edt/layMain.cc create mode 100644 src/pymod/img/img.pro create mode 100644 src/pymod/img/imgMain.cc create mode 100644 src/pymod/img/lay.pro create mode 100644 src/pymod/img/layMain.cc create mode 100644 src/pymod/lym/lym.pro create mode 100644 src/pymod/lym/lymMain.cc diff --git a/setup.py b/setup.py index a2631a25a..595d035f1 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ The standalone libraries are basically extension modules. Build requirements are: * curl library * expat library + * png library The main challenge is to map KLayout's shared object architecture. The structure consists of the Python extension libraries and a bunch @@ -269,6 +270,7 @@ class Config(object): if bits: return [quote_path("-I" + os.path.join(bits, "zlib", "include")), quote_path("-I" + os.path.join(bits, "ptw", "include")), + quote_path("-I" + os.path.join(bits, "png", "include")), quote_path("-I" + os.path.join(bits, "expat", "include")), quote_path("-I" + os.path.join(bits, "curl", "include"))] else: @@ -285,9 +287,13 @@ class Config(object): if platform.system() == "Windows": if mod == "_tl": return [ "libcurl", "expat", "pthreadVCE2", "zlib", "wsock32" ] + elif mod == "_lay": + return [ "libpng" ] else: if mod == "_tl": return ['curl', 'expat'] + elif mod == "_lay": + return [ 'png' ] return [] def link_args(self, mod): @@ -300,6 +306,7 @@ class Config(object): if bits: args += [quote_path("/LIBPATH:" + os.path.join(bits, "zlib", "libraries")), quote_path("/LIBPATH:" + os.path.join(bits, "ptw", "libraries")), + quote_path("/LIBPATH:" + os.path.join(bits, "png", "libraries")), quote_path("/LIBPATH:" + os.path.join(bits, "expat", "libraries")), quote_path("/LIBPATH:" + os.path.join(bits, "curl", "libraries"))] return args @@ -334,7 +341,7 @@ class Config(object): """ Returns the macros to use for building """ - return [('HAVE_CURL', 1), ('HAVE_EXPAT', 1), ('KLAYOUT_MAJOR_VERSION', self.major_version()), ('KLAYOUT_MINOR_VERSION', self.minor_version())] + return [('HAVE_PNG', 1), ('HAVE_CURL', 1), ('HAVE_EXPAT', 1), ('KLAYOUT_MAJOR_VERSION', self.major_version()), ('KLAYOUT_MINOR_VERSION', self.minor_version())] def minor_version(self): """ @@ -425,6 +432,7 @@ _gsi = Library(config.root + '._gsi', include_dirs=[_tl_path], extra_objects=[config.path_of('_tl', _tl_path)], language='c++', + libraries=config.libraries('_gsi'), extra_link_args=config.link_args('_gsi'), extra_compile_args=config.compile_args('_gsi'), sources=list(_gsi_sources)) @@ -441,11 +449,29 @@ _pya = Library(config.root + '._pya', include_dirs=[_tl_path, _gsi_path], extra_objects=[config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path)], language='c++', + libraries=config.libraries('_pya'), extra_link_args=config.link_args('_pya'), extra_compile_args=config.compile_args('_pya'), sources=list(_pya_sources)) config.add_extension(_pya) +# ------------------------------------------------------------------ +# _rba dependency library (dummy) + +_rba_path = os.path.join("src", "rbastub") +_rba_sources = set(glob.glob(os.path.join(_rba_path, "*.cc"))) + +_rba = Library(config.root + '._rba', + define_macros=config.macros() + [('MAKE_RBA_LIBRARY', 1)], + include_dirs=[_tl_path, _gsi_path], + extra_objects=[config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path)], + language='c++', + libraries=config.libraries('_rba'), + extra_link_args=config.link_args('_rba'), + extra_compile_args=config.compile_args('_rba'), + sources=list(_rba_sources)) +config.add_extension(_rba) + # ------------------------------------------------------------------ # _db dependency library @@ -457,6 +483,7 @@ _db = Library(config.root + '._db', include_dirs=[_tl_path, _gsi_path, _db_path], extra_objects=[config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path)], language='c++', + libraries=config.libraries('_db'), extra_link_args=config.link_args('_db'), extra_compile_args=config.compile_args('_db'), sources=list(_db_sources)) @@ -473,6 +500,7 @@ _lib = Library(config.root + '._lib', include_dirs=[_tl_path, _gsi_path, _db_path, _lib_path], extra_objects=[config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)], language='c++', + libraries=config.libraries('_lib'), extra_link_args=config.link_args('_lib'), extra_compile_args=config.compile_args('_lib'), sources=list(_lib_sources)) @@ -489,11 +517,97 @@ _rdb = Library(config.root + '._rdb', include_dirs=[_db_path, _tl_path, _gsi_path], extra_objects=[config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)], language='c++', + libraries=config.libraries('_rdb'), extra_link_args=config.link_args('_rdb'), extra_compile_args=config.compile_args('_rdb'), sources=list(_rdb_sources)) config.add_extension(_rdb) +# ------------------------------------------------------------------ +# _lym dependency library + +_lym_path = os.path.join("src", "lym", "lym") +_lym_sources = set(glob.glob(os.path.join(_lym_path, "*.cc"))) + +_lym = Library(config.root + '._lym', + define_macros=config.macros() + [('MAKE_LYM_LIBRARY', 1)], + include_dirs=[_pya_path, _rba_path, _tl_path, _gsi_path], + extra_objects=[config.path_of('_rba', _rba_path), config.path_of('_pya', _pya_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path)], + language='c++', + libraries=config.libraries('_lym'), + extra_link_args=config.link_args('_lym'), + extra_compile_args=config.compile_args('_lym'), + sources=list(_lym_sources)) +config.add_extension(_lym) + +# ------------------------------------------------------------------ +# _lay dependency library + +_lay_path = os.path.join("src", "laybasic", "laybasic") +_lay_sources = set(glob.glob(os.path.join(_lay_path, "*.cc"))) + +_lay = Library(config.root + '._lay', + define_macros=config.macros() + [('MAKE_LAYBASIC_LIBRARY', 1)], + include_dirs=[_lym_path, _rdb_path, _db_path, _tl_path, _gsi_path], + extra_objects=[config.path_of('_lym', _lym_path), config.path_of('_rdb', _rdb_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)], + language='c++', + libraries=config.libraries('_lay'), + extra_link_args=config.link_args('_lay'), + extra_compile_args=config.compile_args('_lay'), + sources=list(_lay_sources)) +config.add_extension(_lay) + +# ------------------------------------------------------------------ +# _ant dependency library + +_ant_path = os.path.join("src", "ant", "ant") +_ant_sources = set(glob.glob(os.path.join(_ant_path, "*.cc"))) + +_ant = Library(config.root + '._ant', + define_macros=config.macros() + [('MAKE_ANT_LIBRARY', 1)], + include_dirs=[_lay_path, _rdb_path, _db_path, _tl_path, _gsi_path], + extra_objects=[config.path_of('_lay', _lay_path), config.path_of('_rdb', _rdb_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)], + language='c++', + libraries=config.libraries('_ant'), + extra_link_args=config.link_args('_ant'), + extra_compile_args=config.compile_args('_ant'), + sources=list(_ant_sources)) +config.add_extension(_ant) + +# ------------------------------------------------------------------ +# _img dependency library + +_img_path = os.path.join("src", "img", "img") +_img_sources = set(glob.glob(os.path.join(_img_path, "*.cc"))) + +_img = Library(config.root + '._img', + define_macros=config.macros() + [('MAKE_ANT_LIBRARY', 1)], + include_dirs=[_lay_path, _rdb_path, _db_path, _tl_path, _gsi_path], + extra_objects=[config.path_of('_lay', _lay_path), config.path_of('_rdb', _rdb_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)], + language='c++', + libraries=config.libraries('_img'), + extra_link_args=config.link_args('_img'), + extra_compile_args=config.compile_args('_img'), + sources=list(_img_sources)) +config.add_extension(_img) + +# ------------------------------------------------------------------ +# _edt dependency library + +_edt_path = os.path.join("src", "edt", "edt") +_edt_sources = set(glob.glob(os.path.join(_edt_path, "*.cc"))) + +_edt = Library(config.root + '._edt', + define_macros=config.macros() + [('MAKE_ANT_LIBRARY', 1)], + include_dirs=[_lay_path, _rdb_path, _db_path, _tl_path, _gsi_path], + extra_objects=[config.path_of('_lay', _lay_path), config.path_of('_rdb', _rdb_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)], + language='c++', + libraries=config.libraries('_edt'), + extra_link_args=config.link_args('_edt'), + extra_compile_args=config.compile_args('_edt'), + sources=list(_edt_sources)) +config.add_extension(_edt) + # ------------------------------------------------------------------ # dependency libraries from db_plugins @@ -577,6 +691,76 @@ rdb = Extension(config.root + '.rdbcore', extra_compile_args=config.compile_args('rdbcore'), sources=list(rdb_sources)) +# ------------------------------------------------------------------ +# lay extension library + +lay_path = os.path.join("src", "pymod", "lay") +lay_sources = set(glob.glob(os.path.join(lay_path, "*.cc"))) + +lay = Extension(config.root + '.laycore', + define_macros=config.macros(), + include_dirs=[_lay_path, _tl_path, _gsi_path, _pya_path], + extra_objects=[config.path_of('_lay', _lay_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_pya', _pya_path)], + extra_link_args=config.link_args('laycore'), + extra_compile_args=config.compile_args('laycore'), + sources=list(lay_sources)) + +# ------------------------------------------------------------------ +# ant extension library + +ant_path = os.path.join("src", "pymod", "ant") +ant_sources = set(glob.glob(os.path.join(ant_path, "*.cc"))) + +ant = Extension(config.root + '.antcore', + define_macros=config.macros(), + include_dirs=[_ant_path, _tl_path, _gsi_path, _pya_path], + extra_objects=[config.path_of('_ant', _ant_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_pya', _pya_path)], + extra_link_args=config.link_args('antcore'), + extra_compile_args=config.compile_args('antcore'), + sources=list(ant_sources)) + +# ------------------------------------------------------------------ +# edt extension library + +edt_path = os.path.join("src", "pymod", "edt") +edt_sources = set(glob.glob(os.path.join(edt_path, "*.cc"))) + +edt = Extension(config.root + '.edtcore', + define_macros=config.macros(), + include_dirs=[_edt_path, _tl_path, _gsi_path, _pya_path], + extra_objects=[config.path_of('_edt', _edt_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_pya', _pya_path)], + extra_link_args=config.link_args('edtcore'), + extra_compile_args=config.compile_args('edtcore'), + sources=list(edt_sources)) + +# ------------------------------------------------------------------ +# img extension library + +img_path = os.path.join("src", "pymod", "img") +img_sources = set(glob.glob(os.path.join(img_path, "*.cc"))) + +img = Extension(config.root + '.imgcore', + define_macros=config.macros(), + include_dirs=[_img_path, _tl_path, _gsi_path, _pya_path], + extra_objects=[config.path_of('_img', _img_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_pya', _pya_path)], + extra_link_args=config.link_args('imgcore'), + extra_compile_args=config.compile_args('imgcore'), + sources=list(img_sources)) + +# ------------------------------------------------------------------ +# lym extension library + +lym_path = os.path.join("src", "pymod", "lym") +lym_sources = set(glob.glob(os.path.join(lym_path, "*.cc"))) + +lym = Extension(config.root + '.lymcore', + define_macros=config.macros(), + include_dirs=[_lym_path, _tl_path, _gsi_path, _pya_path], + extra_objects=[config.path_of('_lym', _lym_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_pya', _pya_path)], + extra_link_args=config.link_args('lymcore'), + extra_compile_args=config.compile_args('lymcore'), + sources=list(lym_sources)) + # ------------------------------------------------------------------ # Core setup function @@ -602,4 +786,4 @@ if __name__ == '__main__': url='https://github.com/klayout/klayout', packages=find_packages('src/pymod/distutils_src'), package_dir={'': 'src/pymod/distutils_src'}, # https://github.com/pypa/setuptools/issues/230 - ext_modules=[_tl, _gsi, _pya, _db, _lib, _rdb] + db_plugins + [tl, db, lib, rdb]) + ext_modules=[_tl, _gsi, _pya, _rba, _db, _lib, _rdb, _lym, _lay, _ant, _edt, _img] + db_plugins + [tl, db, lib, rdb, lay, ant, edt, img, lym]) diff --git a/src/ant/ant/ant.pro b/src/ant/ant/ant.pro index 6232bc294..079b34e75 100644 --- a/src/ant/ant/ant.pro +++ b/src/ant/ant/ant.pro @@ -15,6 +15,10 @@ FORMS = \ RulerConfigPage4.ui \ RulerPropertiesPage.ui \ +} + +# Disabled without Qt: + HEADERS = \ antConfigPage.h \ antPropertiesPage.h \ @@ -23,7 +27,7 @@ SOURCES = \ antConfigPage.cc \ antPropertiesPage.cc \ -} +# Enabled without Qt: HEADERS += \ antConfig.h \ diff --git a/src/ant/ant/antConfigPage.cc b/src/ant/ant/antConfigPage.cc index 2d3e2247e..bf3ef673b 100644 --- a/src/ant/ant/antConfigPage.cc +++ b/src/ant/ant/antConfigPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "antConfigPage.h" #include "ui_RulerConfigPage.h" @@ -417,3 +418,5 @@ ConfigPage4::commit () } } // namespace ant + +#endif diff --git a/src/ant/ant/antConfigPage.h b/src/ant/ant/antConfigPage.h index b032c254a..6c588e88f 100644 --- a/src/ant/ant/antConfigPage.h +++ b/src/ant/ant/antConfigPage.h @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #ifndef HDR_antConfigPage #define HDR_antConfigPage @@ -134,3 +134,5 @@ private: #endif +#endif + diff --git a/src/ant/ant/antForceLink.cc b/src/ant/ant/antForceLink.cc index 4a96a1893..41d78f078 100644 --- a/src/ant/ant/antForceLink.cc +++ b/src/ant/ant/antForceLink.cc @@ -20,7 +20,6 @@ */ - #include "antForceLink.h" namespace ant diff --git a/src/ant/ant/antForceLink.h b/src/ant/ant/antForceLink.h index 4821171a1..4a1323c39 100644 --- a/src/ant/ant/antForceLink.h +++ b/src/ant/ant/antForceLink.h @@ -33,7 +33,7 @@ namespace ant { ANT_PUBLIC int _force_link_f (); - int _force_link_target = _force_link_f (); + static int _force_link_target = _force_link_f (); } #endif diff --git a/src/ant/ant/antPropertiesPage.cc b/src/ant/ant/antPropertiesPage.cc index 565bf182e..99f8f4056 100644 --- a/src/ant/ant/antPropertiesPage.cc +++ b/src/ant/ant/antPropertiesPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "antPropertiesPage.h" #include "layLayoutView.h" @@ -365,3 +366,4 @@ PropertiesPage::apply () } +#endif diff --git a/src/ant/ant/antPropertiesPage.h b/src/ant/ant/antPropertiesPage.h index cd3253129..8e50f4dc4 100644 --- a/src/ant/ant/antPropertiesPage.h +++ b/src/ant/ant/antPropertiesPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_antPropertiesPage #define HDR_antPropertiesPage @@ -70,3 +71,5 @@ private: } #endif + +#endif diff --git a/src/edt/edt/edt.pro b/src/edt/edt/edt.pro index 50ab9a827..5e4b7a3fe 100644 --- a/src/edt/edt/edt.pro +++ b/src/edt/edt/edt.pro @@ -8,15 +8,6 @@ DEFINES += MAKE_EDT_LIBRARY !equals(HAVE_QT, "0") { - HEADERS = \ - edtDialogs.h \ - edtEditorOptionsPages.h \ - edtInstPropertiesPage.h \ - edtPCellParametersPage.h \ - edtPropertiesPages.h \ - edtPropertiesPageUtils.h \ - edtRecentConfigurationPage.h - FORMS = \ AlignOptionsDialog.ui \ BoxPropertiesPage.ui \ @@ -38,7 +29,20 @@ DEFINES += MAKE_EDT_LIBRARY DistributeOptionsDialog.ui \ EditorOptionsInstPCellParam.ui - SOURCES = \ +} + +# Disabled without Qt: + +HEADERS = \ + edtDialogs.h \ + edtEditorOptionsPages.h \ + edtInstPropertiesPage.h \ + edtPCellParametersPage.h \ + edtPropertiesPages.h \ + edtPropertiesPageUtils.h \ + edtRecentConfigurationPage.h + +SOURCES = \ edtDialogs.cc \ edtEditorOptionsPages.cc \ edtInstPropertiesPage.cc \ @@ -47,7 +51,7 @@ DEFINES += MAKE_EDT_LIBRARY edtPropertiesPageUtils.cc \ edtRecentConfigurationPage.cc -} +# Enabled without Qt: HEADERS += \ edtConfig.h \ diff --git a/src/edt/edt/edtDialogs.cc b/src/edt/edt/edtDialogs.cc index 3cd05ea3f..37f6cef49 100644 --- a/src/edt/edt/edtDialogs.cc +++ b/src/edt/edt/edtDialogs.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "dbBox.h" #include "dbLayout.h" @@ -683,3 +685,5 @@ END_PROTECTED; } +#endif + diff --git a/src/edt/edt/edtDialogs.h b/src/edt/edt/edtDialogs.h index f700e01d4..b0ee473a9 100644 --- a/src/edt/edt/edtDialogs.h +++ b/src/edt/edt/edtDialogs.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_edtDialogs @@ -208,3 +209,5 @@ private: #endif +#endif + diff --git a/src/edt/edt/edtEditorOptionsPages.cc b/src/edt/edt/edtEditorOptionsPages.cc index 3f33fd310..ff6b298d8 100644 --- a/src/edt/edt/edtEditorOptionsPages.cc +++ b/src/edt/edt/edtEditorOptionsPages.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "tlInternational.h" #include "dbLibrary.h" @@ -890,3 +891,4 @@ EditorOptionsInstPCellParam::update_pcell_parameters (const std::vector &pa } - +#endif diff --git a/src/edt/edt/edtPCellParametersPage.h b/src/edt/edt/edtPCellParametersPage.h index f148c7c1c..aa5a6ef38 100644 --- a/src/edt/edt/edtPCellParametersPage.h +++ b/src/edt/edt/edtPCellParametersPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_edtPCellParametersPage #define HDR_edtPCellParametersPage @@ -157,3 +158,5 @@ private: } #endif + +#endif diff --git a/src/edt/edt/edtPropertiesPageUtils.cc b/src/edt/edt/edtPropertiesPageUtils.cc index f6df8fc63..abd3c4afe 100644 --- a/src/edt/edt/edtPropertiesPageUtils.cc +++ b/src/edt/edt/edtPropertiesPageUtils.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "edtPropertiesPageUtils.h" @@ -870,3 +871,4 @@ coords_to_string (const db::DPoint &dp, double dbu, bool du, const char *sep) } +#endif diff --git a/src/edt/edt/edtPropertiesPageUtils.h b/src/edt/edt/edtPropertiesPageUtils.h index e20e76db7..b66eba7b6 100644 --- a/src/edt/edt/edtPropertiesPageUtils.h +++ b/src/edt/edt/edtPropertiesPageUtils.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_edtPropertiesPageUtils #define HDR_edtPropertiesPageUtils @@ -522,3 +523,4 @@ db::Coord coord_from_string (const char *txt, double dbu, bool du, const db::VCp #endif +#endif diff --git a/src/edt/edt/edtPropertiesPages.cc b/src/edt/edt/edtPropertiesPages.cc index 5943d609a..7a34c1981 100644 --- a/src/edt/edt/edtPropertiesPages.cc +++ b/src/edt/edt/edtPropertiesPages.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "edtPropertiesPages.h" #include "edtPropertiesPageUtils.h" @@ -1183,3 +1184,4 @@ EditablePathPropertiesPage::type_selected (int t) } +#endif diff --git a/src/edt/edt/edtPropertiesPages.h b/src/edt/edt/edtPropertiesPages.h index 39e0b6fb5..0172cd1c5 100644 --- a/src/edt/edt/edtPropertiesPages.h +++ b/src/edt/edt/edtPropertiesPages.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_edtPropertiesPages @@ -207,3 +208,5 @@ private: } #endif + +#endif diff --git a/src/edt/edt/edtRecentConfigurationPage.cc b/src/edt/edt/edtRecentConfigurationPage.cc index 3781aeffc..09c4a50ed 100644 --- a/src/edt/edt/edtRecentConfigurationPage.cc +++ b/src/edt/edt/edtRecentConfigurationPage.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "edtRecentConfigurationPage.h" #include "edtUtils.h" #include "layDispatcher.h" @@ -428,3 +430,5 @@ RecentConfigurationPage::commit_recent (lay::Dispatcher *root) } } + +#endif diff --git a/src/edt/edt/edtRecentConfigurationPage.h b/src/edt/edt/edtRecentConfigurationPage.h index e43352ec3..ab8c88800 100644 --- a/src/edt/edt/edtRecentConfigurationPage.h +++ b/src/edt/edt/edtRecentConfigurationPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_edtRecentConfigurationPage #define HDR_edtRecentConfigurationPage @@ -112,3 +113,4 @@ private: #endif +#endif diff --git a/src/img/img/img.pro b/src/img/img/img.pro index 13eb01db9..4bfd510ab 100644 --- a/src/img/img/img.pro +++ b/src/img/img/img.pro @@ -13,6 +13,10 @@ FORMS = \ ImageLandmarksDialog.ui \ ImagePropertiesPage.ui \ +} + +# Disabled without Qt: + HEADERS = \ imgLandmarksDialog.h \ imgNavigator.h \ @@ -25,7 +29,7 @@ SOURCES = \ imgPropertiesPage.cc \ imgWidgets.cc \ -} +# Enabled without Qt: HEADERS += \ imgObject.h \ diff --git a/src/img/img/imgForceLink.cc b/src/img/img/imgForceLink.cc index 2dbd66143..86247ea5c 100644 --- a/src/img/img/imgForceLink.cc +++ b/src/img/img/imgForceLink.cc @@ -10,7 +10,7 @@ (at your option) any later version. This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of + but WITHOUT ANY WARRANTY; without even the implied warrimgy of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -20,7 +20,6 @@ */ - #include "imgForceLink.h" namespace img diff --git a/src/img/img/imgForceLink.h b/src/img/img/imgForceLink.h index 1dfc4e901..a86fd3b88 100644 --- a/src/img/img/imgForceLink.h +++ b/src/img/img/imgForceLink.h @@ -10,7 +10,7 @@ (at your option) any later version. This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of + but WITHOUT ANY WARRANTY; without even the implied warrimgy of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -33,7 +33,7 @@ namespace img { IMG_PUBLIC int _force_link_f (); - int _force_link_target = _force_link_f (); + static int _force_link_target = _force_link_f (); } #endif diff --git a/src/img/img/imgLandmarksDialog.cc b/src/img/img/imgLandmarksDialog.cc index 16d9142cf..25bb29e0d 100644 --- a/src/img/img/imgLandmarksDialog.cc +++ b/src/img/img/imgLandmarksDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "imgLandmarksDialog.h" #include "imgService.h" @@ -499,3 +500,4 @@ LandmarksDialog::landmarks_updated () } +#endif diff --git a/src/img/img/imgLandmarksDialog.h b/src/img/img/imgLandmarksDialog.h index cad11fbfe..8c0d099e9 100644 --- a/src/img/img/imgLandmarksDialog.h +++ b/src/img/img/imgLandmarksDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_imgLandmarksDialog #define HDR_imgLandmarksDialog @@ -65,3 +66,5 @@ private: } #endif + +#endif diff --git a/src/img/img/imgNavigator.cc b/src/img/img/imgNavigator.cc index b6640e070..634b8bd1e 100644 --- a/src/img/img/imgNavigator.cc +++ b/src/img/img/imgNavigator.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "laybasicConfig.h" #include "layMarker.h" @@ -113,3 +114,4 @@ Navigator::background_color (QColor c) } +#endif diff --git a/src/img/img/imgNavigator.h b/src/img/img/imgNavigator.h index 6e5922b3f..013d9a530 100644 --- a/src/img/img/imgNavigator.h +++ b/src/img/img/imgNavigator.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_imgNavigator #define HDR_imgNavigator @@ -70,3 +71,4 @@ private: #endif +#endif diff --git a/src/img/img/imgPropertiesPage.cc b/src/img/img/imgPropertiesPage.cc index aec31b1b0..c53d36d77 100644 --- a/src/img/img/imgPropertiesPage.cc +++ b/src/img/img/imgPropertiesPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "imgPropertiesPage.h" #include "imgLandmarksDialog.h" @@ -1003,3 +1004,4 @@ PropertiesPage::define_landmarks_pressed () } +#endif diff --git a/src/img/img/imgPropertiesPage.h b/src/img/img/imgPropertiesPage.h index c3b139b85..797bedd86 100644 --- a/src/img/img/imgPropertiesPage.h +++ b/src/img/img/imgPropertiesPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_imgPropertiesPage #define HDR_imgPropertiesPage @@ -105,3 +106,5 @@ private: } #endif + +#endif diff --git a/src/img/img/imgWidgets.cc b/src/img/img/imgWidgets.cc index 92952dac5..32d85fdae 100644 --- a/src/img/img/imgWidgets.cc +++ b/src/img/img/imgWidgets.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "imgWidgets.h" @@ -452,3 +453,5 @@ ColorBar::paintEvent (QPaintEvent *) } +#endif + diff --git a/src/img/img/imgWidgets.h b/src/img/img/imgWidgets.h index 06cef78ef..b44a8e0b0 100644 --- a/src/img/img/imgWidgets.h +++ b/src/img/img/imgWidgets.h @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #ifndef HDR_imgWidgets #define HDR_imgWidgets @@ -138,3 +140,4 @@ private: #endif +#endif diff --git a/src/laybasic/laybasic/gsiDeclLayDialogs.cc b/src/laybasic/laybasic/gsiDeclLayDialogs.cc index 9cf0bc960..61a598926 100644 --- a/src/laybasic/laybasic/gsiDeclLayDialogs.cc +++ b/src/laybasic/laybasic/gsiDeclLayDialogs.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "gsiDecl.h" #include "gsiDeclBasic.h" #include "layBrowserDialog.h" @@ -1186,3 +1188,5 @@ Class decl_MessageBox (QT_EXTERNAL_BASE (QMainWindow) "lay", "Messag ); } + +#endif diff --git a/src/laybasic/laybasic/gsiDeclLayMenu.cc b/src/laybasic/laybasic/gsiDeclLayMenu.cc index 80f7c58b9..9bf185495 100644 --- a/src/laybasic/laybasic/gsiDeclLayMenu.cc +++ b/src/laybasic/laybasic/gsiDeclLayMenu.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "gsiDecl.h" #include "gsiSignals.h" @@ -410,3 +411,5 @@ Class decl_Action (decl_ActionBase, "lay", "Action", ); } + +#endif diff --git a/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc b/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc index b19e2ddf9..0190f3890 100644 --- a/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc +++ b/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "gsiDecl.h" #include "gsiDeclBasic.h" @@ -219,7 +220,7 @@ gsi::ClassExt decl_ext_layout_view ( ) ); - - } +#endif + diff --git a/src/laybasic/laybasic/gsiDeclLayStream.cc b/src/laybasic/laybasic/gsiDeclLayStream.cc index 403cef728..b0ce8c418 100644 --- a/src/laybasic/laybasic/gsiDeclLayStream.cc +++ b/src/laybasic/laybasic/gsiDeclLayStream.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "gsiDecl.h" #include "dbReader.h" #include "layTechnology.h" @@ -46,4 +48,5 @@ gsi::ClassExt layout_reader_decl ( } +#endif diff --git a/src/laybasic/laybasic/gtf.cc b/src/laybasic/laybasic/gtf.cc index a5b2534ae..d5eb5797e 100644 --- a/src/laybasic/laybasic/gtf.cc +++ b/src/laybasic/laybasic/gtf.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "gtf.h" #include "tlException.h" @@ -1928,4 +1929,5 @@ GtfXmlHandler::warning (const QXmlParseException &ex) } +#endif diff --git a/src/laybasic/laybasic/gtf.h b/src/laybasic/laybasic/gtf.h index c0fd84c7a..98f58a099 100644 --- a/src/laybasic/laybasic/gtf.h +++ b/src/laybasic/laybasic/gtf.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_gtf #define HDR_gtf @@ -569,5 +570,4 @@ LAYBASIC_PUBLIC tl::Variant image_to_variant (const QImage &image); #endif - - +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/gtfdummy.cc b/src/laybasic/laybasic/gtfdummy.cc index ce531c855..e1acdb547 100644 --- a/src/laybasic/laybasic/gtfdummy.cc +++ b/src/laybasic/laybasic/gtfdummy.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "gtf.h" @@ -35,4 +36,5 @@ void Recorder::errlog_puts (const char *s) { } } +#endif diff --git a/src/laybasic/laybasic/layAbstractMenu.cc b/src/laybasic/laybasic/layAbstractMenu.cc index 61a91e89d..e7b587f9a 100644 --- a/src/laybasic/laybasic/layAbstractMenu.cc +++ b/src/laybasic/laybasic/layAbstractMenu.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layAbstractMenu.h" #include "layDispatcher.h" @@ -1702,3 +1703,5 @@ AbstractMenu::get_shortcuts (const std::string &root, std::map @@ -108,3 +110,6 @@ BackgroundAwareTreeStyle::drawPrimitive (QStyle::PrimitiveElement pe, const QSty } } + +#endif + diff --git a/src/laybasic/laybasic/layBackgroundAwareTreeStyle.h b/src/laybasic/laybasic/layBackgroundAwareTreeStyle.h index 18b8bd642..03ec99000 100644 --- a/src/laybasic/laybasic/layBackgroundAwareTreeStyle.h +++ b/src/laybasic/laybasic/layBackgroundAwareTreeStyle.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBackgroundAwareTreeStyle #define HDR_layBackgroundAwareTreeStyle @@ -50,3 +51,4 @@ public: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBitmap.h b/src/laybasic/laybasic/layBitmap.h index dc9303899..ff2b69df3 100644 --- a/src/laybasic/laybasic/layBitmap.h +++ b/src/laybasic/laybasic/layBitmap.h @@ -20,8 +20,6 @@ */ - - #ifndef HDR_layBitmap #define HDR_layBitmap @@ -396,4 +394,3 @@ Bitmap::scanline (unsigned n) const } // namespace lay #endif - diff --git a/src/laybasic/laybasic/layBookmarkList.cc b/src/laybasic/laybasic/layBookmarkList.cc index 595ac8b7a..dcffe8e15 100644 --- a/src/laybasic/laybasic/layBookmarkList.cc +++ b/src/laybasic/laybasic/layBookmarkList.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layBookmarkList.h" #include "tlXMLParser.h" @@ -118,3 +119,5 @@ BookmarkList::propose_new_bookmark_name () const } +#endif + diff --git a/src/laybasic/laybasic/layBookmarkList.h b/src/laybasic/laybasic/layBookmarkList.h index 839530a93..9d4090d53 100644 --- a/src/laybasic/laybasic/layBookmarkList.h +++ b/src/laybasic/laybasic/layBookmarkList.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBookmarkList #define HDR_layBookmarkList @@ -208,3 +209,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBookmarkManagementForm.cc b/src/laybasic/laybasic/layBookmarkManagementForm.cc index e582bbc4d..51b9358d1 100644 --- a/src/laybasic/laybasic/layBookmarkManagementForm.cc +++ b/src/laybasic/laybasic/layBookmarkManagementForm.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layBookmarkManagementForm.h" #include "dbCellInst.h" @@ -109,5 +110,5 @@ BookmarkManagementForm::accept () } - +#endif diff --git a/src/laybasic/laybasic/layBookmarkManagementForm.h b/src/laybasic/laybasic/layBookmarkManagementForm.h index 0d80e0941..0b419c181 100644 --- a/src/laybasic/laybasic/layBookmarkManagementForm.h +++ b/src/laybasic/laybasic/layBookmarkManagementForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBookmarkManagementForm #define HDR_layBookmarkManagementForm @@ -63,3 +64,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBookmarksView.cc b/src/laybasic/laybasic/layBookmarksView.cc index 4c104316c..88d359385 100644 --- a/src/laybasic/laybasic/layBookmarksView.cc +++ b/src/laybasic/laybasic/layBookmarksView.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layBookmarksView.h" #include "layLayoutView.h" @@ -211,3 +212,5 @@ static tl::RegisteredClass config_decl (new BookmarksVie } +#endif + diff --git a/src/laybasic/laybasic/layBookmarksView.h b/src/laybasic/laybasic/layBookmarksView.h index 70c6958a6..3a4f78a63 100644 --- a/src/laybasic/laybasic/layBookmarksView.h +++ b/src/laybasic/laybasic/layBookmarksView.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBookmarksView #define HDR_layBookmarksView @@ -75,3 +76,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBrowseInstancesForm.cc b/src/laybasic/laybasic/layBrowseInstancesForm.cc index 0b1214d6f..f64695169 100644 --- a/src/laybasic/laybasic/layBrowseInstancesForm.cc +++ b/src/laybasic/laybasic/layBrowseInstancesForm.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include #include @@ -912,3 +913,5 @@ BrowseInstancesForm::prev_inst () } +#endif + diff --git a/src/laybasic/laybasic/layBrowseInstancesForm.h b/src/laybasic/laybasic/layBrowseInstancesForm.h index ae4d5e2b0..8cb36254e 100644 --- a/src/laybasic/laybasic/layBrowseInstancesForm.h +++ b/src/laybasic/laybasic/layBrowseInstancesForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBrowseInstancesForm #define HDR_layBrowseInstancesForm @@ -132,3 +133,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBrowseShapesForm.cc b/src/laybasic/laybasic/layBrowseShapesForm.cc index d733ac1a2..01df4fc13 100644 --- a/src/laybasic/laybasic/layBrowseShapesForm.cc +++ b/src/laybasic/laybasic/layBrowseShapesForm.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include #include @@ -1179,3 +1180,5 @@ BrowseShapesForm::prev_inst () } +#endif + diff --git a/src/laybasic/laybasic/layBrowseShapesForm.h b/src/laybasic/laybasic/layBrowseShapesForm.h index c13b6b4e3..9e79ff62a 100644 --- a/src/laybasic/laybasic/layBrowseShapesForm.h +++ b/src/laybasic/laybasic/layBrowseShapesForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBrowseShapesForm #define HDR_layBrowseShapesForm @@ -134,3 +135,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBrowser.cc b/src/laybasic/laybasic/layBrowser.cc index 8a9fcc241..049076bf5 100644 --- a/src/laybasic/laybasic/layBrowser.cc +++ b/src/laybasic/laybasic/layBrowser.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include @@ -95,3 +96,5 @@ Browser::accept () } +#endif + diff --git a/src/laybasic/laybasic/layBrowser.h b/src/laybasic/laybasic/layBrowser.h index 24bafc8e4..b5ae1b70d 100644 --- a/src/laybasic/laybasic/layBrowser.h +++ b/src/laybasic/laybasic/layBrowser.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBrowser #define HDR_layBrowser @@ -143,3 +144,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBrowserDialog.cc b/src/laybasic/laybasic/layBrowserDialog.cc index 2e4862562..9fcdccdc1 100644 --- a/src/laybasic/laybasic/layBrowserDialog.cc +++ b/src/laybasic/laybasic/layBrowserDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layBrowserPanel.h" #include "layBrowserDialog.h" @@ -128,3 +129,5 @@ BrowserDialog::accept () } +#endif + diff --git a/src/laybasic/laybasic/layBrowserDialog.h b/src/laybasic/laybasic/layBrowserDialog.h index 6329d2c95..80bd01b41 100644 --- a/src/laybasic/laybasic/layBrowserDialog.h +++ b/src/laybasic/laybasic/layBrowserDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBrowserDialog #define HDR_layBrowserDialog @@ -132,3 +133,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBrowserPanel.cc b/src/laybasic/laybasic/layBrowserPanel.cc index 7a05aba0d..75d0a0a08 100644 --- a/src/laybasic/laybasic/layBrowserPanel.cc +++ b/src/laybasic/laybasic/layBrowserPanel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layBrowserPanel.h" #include "layDispatcher.h" @@ -831,4 +832,5 @@ BrowserSource::attach (lay::BrowserPanel *d) } +#endif diff --git a/src/laybasic/laybasic/layBrowserPanel.h b/src/laybasic/laybasic/layBrowserPanel.h index 3dd593327..e97851b3d 100644 --- a/src/laybasic/laybasic/layBrowserPanel.h +++ b/src/laybasic/laybasic/layBrowserPanel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBrowserPanel #define HDR_layBrowserPanel @@ -487,3 +488,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layBusy.cc b/src/laybasic/laybasic/layBusy.cc index bfd7cda31..ea03d3f44 100644 --- a/src/laybasic/laybasic/layBusy.cc +++ b/src/laybasic/laybasic/layBusy.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "layBusy.h" #include "tlThreads.h" @@ -80,3 +82,5 @@ BusySection::is_busy () // ---------------------------------------------------------------------------------------------------------- } + +#endif diff --git a/src/laybasic/laybasic/layBusy.h b/src/laybasic/laybasic/layBusy.h index ed9597c33..9996faef9 100644 --- a/src/laybasic/laybasic/layBusy.h +++ b/src/laybasic/laybasic/layBusy.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layBusy #define HDR_layBusy @@ -63,3 +64,5 @@ private: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layCellSelectionForm.cc b/src/laybasic/laybasic/layCellSelectionForm.cc index 0bd3ff519..80011e089 100644 --- a/src/laybasic/laybasic/layCellSelectionForm.cc +++ b/src/laybasic/laybasic/layCellSelectionForm.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include #include @@ -876,4 +877,4 @@ LibraryCellSelectionForm::name_changed (const QString &s) } - +#endif diff --git a/src/laybasic/laybasic/layCellSelectionForm.h b/src/laybasic/laybasic/layCellSelectionForm.h index adc0a5cc7..0c3fd9027 100644 --- a/src/laybasic/laybasic/layCellSelectionForm.h +++ b/src/laybasic/laybasic/layCellSelectionForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layCellSelectionForm #define HDR_layCellSelectionForm @@ -201,3 +202,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layCellTreeModel.cc b/src/laybasic/laybasic/layCellTreeModel.cc index 3f501eff9..0c45b929b 100644 --- a/src/laybasic/laybasic/layCellTreeModel.cc +++ b/src/laybasic/laybasic/layCellTreeModel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layCellTreeModel.h" #include "layLayoutView.h" @@ -1296,3 +1297,6 @@ CellTreeModel::locate (const char *name, bool glob_pattern, bool case_sensitive, } } // namespace lay + +#endif + diff --git a/src/laybasic/laybasic/layCellTreeModel.h b/src/laybasic/laybasic/layCellTreeModel.h index 30608ee97..590f3dfb0 100644 --- a/src/laybasic/laybasic/layCellTreeModel.h +++ b/src/laybasic/laybasic/layCellTreeModel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layCellTreeModel #define HDR_layCellTreeModel @@ -349,3 +350,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layColor.h b/src/laybasic/laybasic/layColor.h index 48766d3e0..e8d4c3d2a 100644 --- a/src/laybasic/laybasic/layColor.h +++ b/src/laybasic/laybasic/layColor.h @@ -20,7 +20,6 @@ */ - #ifndef HDR_layColor #define HDR_layColor diff --git a/src/laybasic/laybasic/layConfigurationDialog.cc b/src/laybasic/laybasic/layConfigurationDialog.cc index 6a10774ac..46de6b29f 100644 --- a/src/laybasic/laybasic/layConfigurationDialog.cc +++ b/src/laybasic/laybasic/layConfigurationDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include #include @@ -144,3 +145,4 @@ ConfigurationDialog::ok_clicked () } +#endif diff --git a/src/laybasic/laybasic/layConfigurationDialog.h b/src/laybasic/laybasic/layConfigurationDialog.h index 2e800ca47..95627bf07 100644 --- a/src/laybasic/laybasic/layConfigurationDialog.h +++ b/src/laybasic/laybasic/layConfigurationDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layConfigurationDialog #define HDR_layConfigurationDialog @@ -69,3 +70,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layCursor.cc b/src/laybasic/laybasic/layCursor.cc index b718e62fc..b3b2b8b97 100644 --- a/src/laybasic/laybasic/layCursor.cc +++ b/src/laybasic/laybasic/layCursor.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layCursor.h" @@ -77,3 +78,4 @@ Cursor::qcursor (cursor_shape cursor) } +#endif diff --git a/src/laybasic/laybasic/layCursor.h b/src/laybasic/laybasic/layCursor.h index a3bc01ca5..43002bc37 100644 --- a/src/laybasic/laybasic/layCursor.h +++ b/src/laybasic/laybasic/layCursor.h @@ -20,13 +20,14 @@ */ - #ifndef HDR_layCursor #define HDR_layCursor #include "laybasicCommon.h" +#if defined(HAVE_QT) class QCursor; +#endif namespace lay { @@ -64,13 +65,15 @@ struct LAYBASIC_PUBLIC Cursor closed_hand = 18 }; +#if defined(HAVE_QT) /** * @brief Get the QCursor from the lay::cursor_shape enum */ static QCursor qcursor (cursor_shape cursor); +#endif + }; } #endif - diff --git a/src/laybasic/laybasic/layDialogs.cc b/src/laybasic/laybasic/layDialogs.cc index 0c89906fc..1a93cf670 100644 --- a/src/laybasic/laybasic/layDialogs.cc +++ b/src/laybasic/laybasic/layDialogs.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layDialogs.h" @@ -1411,3 +1412,4 @@ END_PROTECTED } +#endif diff --git a/src/laybasic/laybasic/layDialogs.h b/src/laybasic/laybasic/layDialogs.h index c338e6a48..0e35fb555 100644 --- a/src/laybasic/laybasic/layDialogs.h +++ b/src/laybasic/laybasic/layDialogs.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layDialogs #define HDR_layDialogs @@ -468,4 +469,4 @@ public: #endif - +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layDragDropData.cc b/src/laybasic/laybasic/layDragDropData.cc index 76ceadf80..e145c0c9a 100644 --- a/src/laybasic/laybasic/layDragDropData.cc +++ b/src/laybasic/laybasic/layDragDropData.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "layDragDropData.h" #include @@ -106,3 +108,5 @@ CellDragDropData::deserialize (const QByteArray &ba) } } + +#endif diff --git a/src/laybasic/laybasic/layDragDropData.h b/src/laybasic/laybasic/layDragDropData.h index c830debe3..78bc31fa0 100644 --- a/src/laybasic/laybasic/layDragDropData.h +++ b/src/laybasic/laybasic/layDragDropData.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layDragDropData #define HDR_layDragDropData @@ -169,3 +170,5 @@ private: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layEditLineStyleWidget.cc b/src/laybasic/laybasic/layEditLineStyleWidget.cc index ea6fdf748..0f119b33a 100644 --- a/src/laybasic/laybasic/layEditLineStyleWidget.cc +++ b/src/laybasic/laybasic/layEditLineStyleWidget.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layEditLineStyleWidget.h" @@ -422,3 +423,4 @@ EditLineStyleWidget::redo (db::Op *op) } +#endif diff --git a/src/laybasic/laybasic/layEditLineStyleWidget.h b/src/laybasic/laybasic/layEditLineStyleWidget.h index 1deaef97f..14f369c62 100644 --- a/src/laybasic/laybasic/layEditLineStyleWidget.h +++ b/src/laybasic/laybasic/layEditLineStyleWidget.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layEditLineStyleWidget #define HDR_layEditLineStyleWidget @@ -100,3 +101,5 @@ private: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layEditLineStylesForm.cc b/src/laybasic/laybasic/layEditLineStylesForm.cc index f8e804b83..a0cca3f00 100644 --- a/src/laybasic/laybasic/layEditLineStylesForm.cc +++ b/src/laybasic/laybasic/layEditLineStylesForm.cc @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #include "layEditLineStylesForm.h" #include "ui_EditLineStylesForm.h" @@ -556,3 +556,4 @@ EditLineStylesForm::redo (db::Op *op) } +#endif diff --git a/src/laybasic/laybasic/layEditLineStylesForm.h b/src/laybasic/laybasic/layEditLineStylesForm.h index 25cc35d9c..a7e94a3a3 100644 --- a/src/laybasic/laybasic/layEditLineStylesForm.h +++ b/src/laybasic/laybasic/layEditLineStylesForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layEditLineStylesForm #define HDR_layEditLineStylesForm @@ -107,3 +108,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layEditStippleWidget.cc b/src/laybasic/laybasic/layEditStippleWidget.cc index 1bb613e2e..a87b9870a 100644 --- a/src/laybasic/laybasic/layEditStippleWidget.cc +++ b/src/laybasic/laybasic/layEditStippleWidget.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layEditStippleWidget.h" @@ -529,3 +530,4 @@ EditStippleWidget::redo (db::Op *op) } +#endif diff --git a/src/laybasic/laybasic/layEditStippleWidget.h b/src/laybasic/laybasic/layEditStippleWidget.h index e94d4228a..b3944f3d4 100644 --- a/src/laybasic/laybasic/layEditStippleWidget.h +++ b/src/laybasic/laybasic/layEditStippleWidget.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layEditStippleWidget #define HDR_layEditStippleWidget @@ -109,3 +110,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layEditStipplesForm.cc b/src/laybasic/laybasic/layEditStipplesForm.cc index 19cc4616d..6005880ce 100644 --- a/src/laybasic/laybasic/layEditStipplesForm.cc +++ b/src/laybasic/laybasic/layEditStipplesForm.cc @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #include "layEditStipplesForm.h" #include "ui_EditStipplesForm.h" @@ -623,3 +623,4 @@ EditStipplesForm::redo (db::Op *op) } +#endif diff --git a/src/laybasic/laybasic/layEditStipplesForm.h b/src/laybasic/laybasic/layEditStipplesForm.h index 5fe4fc0f0..e8ca40ce8 100644 --- a/src/laybasic/laybasic/layEditStipplesForm.h +++ b/src/laybasic/laybasic/layEditStipplesForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layEditStipplesForm #define HDR_layEditStipplesForm @@ -111,3 +112,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layEditorOptionsFrame.cc b/src/laybasic/laybasic/layEditorOptionsFrame.cc index dd593f9e4..d7db2e458 100644 --- a/src/laybasic/laybasic/layEditorOptionsFrame.cc +++ b/src/laybasic/laybasic/layEditorOptionsFrame.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "layEditorOptionsFrame.h" #include "layEditorOptionsPage.h" #include "layEditorOptionsPages.h" @@ -68,3 +70,5 @@ EditorOptionsFrame::populate (LayoutView *view) } } + +#endif diff --git a/src/laybasic/laybasic/layEditorOptionsFrame.h b/src/laybasic/laybasic/layEditorOptionsFrame.h index fff1f7d40..396f0d9b7 100644 --- a/src/laybasic/laybasic/layEditorOptionsFrame.h +++ b/src/laybasic/laybasic/layEditorOptionsFrame.h @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #ifndef HDR_layEditorOptionsFrame #define HDR_layEditorOptionsFrame @@ -53,3 +55,5 @@ public: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layEditorOptionsPage.cc b/src/laybasic/laybasic/layEditorOptionsPage.cc index f2f893da0..ba8dadb2d 100644 --- a/src/laybasic/laybasic/layEditorOptionsPage.cc +++ b/src/laybasic/laybasic/layEditorOptionsPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "tlInternational.h" #include "layEditorOptionsPage.h" @@ -88,3 +89,5 @@ EditorOptionsPage::activate (bool active) } } + +#endif diff --git a/src/laybasic/laybasic/layEditorOptionsPage.h b/src/laybasic/laybasic/layEditorOptionsPage.h index fb752ffaa..36356dcf3 100644 --- a/src/laybasic/laybasic/layEditorOptionsPage.h +++ b/src/laybasic/laybasic/layEditorOptionsPage.h @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #ifndef HDR_layEditorOptionsPage #define HDR_layEditorOptionsPage @@ -99,3 +101,5 @@ private: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layEditorOptionsPages.cc b/src/laybasic/laybasic/layEditorOptionsPages.cc index a17d518b8..2c8d443fa 100644 --- a/src/laybasic/laybasic/layEditorOptionsPages.cc +++ b/src/laybasic/laybasic/layEditorOptionsPages.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "tlInternational.h" #include "layEditorOptionsPages.h" @@ -214,3 +215,4 @@ static void configure_from_line_edit (lay::Dispatcher *dispatcher, QLineEdit *le } +#endif diff --git a/src/laybasic/laybasic/layEditorOptionsPages.h b/src/laybasic/laybasic/layEditorOptionsPages.h index a65e3c100..a21f82fd0 100644 --- a/src/laybasic/laybasic/layEditorOptionsPages.h +++ b/src/laybasic/laybasic/layEditorOptionsPages.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layEditorOptionsPages #define HDR_layEditorOptionsPages @@ -83,3 +84,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layFileDialog.cc b/src/laybasic/laybasic/layFileDialog.cc index 79c04addd..9630fd471 100644 --- a/src/laybasic/laybasic/layFileDialog.cc +++ b/src/laybasic/laybasic/layFileDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include #include @@ -303,3 +304,4 @@ FileDialog::get_save (std::string &fp, const std::string &title) } // namespace lay +#endif diff --git a/src/laybasic/laybasic/layFileDialog.h b/src/laybasic/laybasic/layFileDialog.h index 54f320265..2ec220dd2 100644 --- a/src/laybasic/laybasic/layFileDialog.h +++ b/src/laybasic/laybasic/layFileDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layFileDialog #define HDR_layFileDialog @@ -98,3 +99,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layGenericSyntaxHighlighter.cc b/src/laybasic/laybasic/layGenericSyntaxHighlighter.cc index 4aaa01596..1705d86bf 100644 --- a/src/laybasic/laybasic/layGenericSyntaxHighlighter.cc +++ b/src/laybasic/laybasic/layGenericSyntaxHighlighter.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layGenericSyntaxHighlighter.h" @@ -1726,4 +1727,4 @@ GenericSyntaxHighlighter::highlightBlock(const QString &text) } - +#endif diff --git a/src/laybasic/laybasic/layGenericSyntaxHighlighter.h b/src/laybasic/laybasic/layGenericSyntaxHighlighter.h index c73d0c22d..cbc0f684f 100644 --- a/src/laybasic/laybasic/layGenericSyntaxHighlighter.h +++ b/src/laybasic/laybasic/layGenericSyntaxHighlighter.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layGenericSyntaxHighlighter #define HDR_layGenericSyntaxHighlighter @@ -735,3 +736,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layGridNetConfigPage.cc b/src/laybasic/laybasic/layGridNetConfigPage.cc index 07866fd48..2538f6129 100644 --- a/src/laybasic/laybasic/layGridNetConfigPage.cc +++ b/src/laybasic/laybasic/layGridNetConfigPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "laybasicConfig.h" #include "layGridNetConfigPage.h" @@ -111,3 +112,4 @@ GridNetConfigPage::commit (lay::Dispatcher *root) } // namespace lay +#endif diff --git a/src/laybasic/laybasic/layGridNetConfigPage.h b/src/laybasic/laybasic/layGridNetConfigPage.h index 1e6599131..585bd6a7e 100644 --- a/src/laybasic/laybasic/layGridNetConfigPage.h +++ b/src/laybasic/laybasic/layGridNetConfigPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layGridNetConfigPage #define HDR_layGridNetConfigPage @@ -58,3 +59,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layHierarchyControlPanel.cc b/src/laybasic/laybasic/layHierarchyControlPanel.cc index 947b2f3c7..59293709d 100644 --- a/src/laybasic/laybasic/layHierarchyControlPanel.cc +++ b/src/laybasic/laybasic/layHierarchyControlPanel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include @@ -1243,3 +1244,5 @@ public: static tl::RegisteredClass config_decl (new HierarchyControlPanelPluginDeclaration (), -8, "HierarchyControlPanelPlugin"); } // namespace lay + +#endif diff --git a/src/laybasic/laybasic/layHierarchyControlPanel.h b/src/laybasic/laybasic/layHierarchyControlPanel.h index be6c29db8..b5dab0ebc 100644 --- a/src/laybasic/laybasic/layHierarchyControlPanel.h +++ b/src/laybasic/laybasic/layHierarchyControlPanel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layHierarchyControlPanel #define HDR_layHierarchyControlPanel @@ -340,3 +341,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layIndexedNetlistModel.cc b/src/laybasic/laybasic/layIndexedNetlistModel.cc index 8c9fd6788..35c1f67a4 100644 --- a/src/laybasic/laybasic/layIndexedNetlistModel.cc +++ b/src/laybasic/laybasic/layIndexedNetlistModel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layIndexedNetlistModel.h" #include "dbNetlist.h" @@ -463,3 +464,5 @@ SingleIndexedNetlistModel::subcircuit_index (const subcircuit_pair &subcircuits) } } + +#endif diff --git a/src/laybasic/laybasic/layIndexedNetlistModel.h b/src/laybasic/laybasic/layIndexedNetlistModel.h index 6e6c35610..188a732af 100644 --- a/src/laybasic/laybasic/layIndexedNetlistModel.h +++ b/src/laybasic/laybasic/layIndexedNetlistModel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layIndexedNetlistModel #define HDR_layIndexedNetlistModel @@ -205,3 +206,5 @@ private: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layItemDelegates.cc b/src/laybasic/laybasic/layItemDelegates.cc index 6d3e230c6..dd5e8f112 100644 --- a/src/laybasic/laybasic/layItemDelegates.cc +++ b/src/laybasic/laybasic/layItemDelegates.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "layItemDelegates.h" #include @@ -206,3 +208,5 @@ HTMLItemDelegate::editorEvent (QEvent *event, QAbstractItemModel * /*model*/, co } } + +#endif diff --git a/src/laybasic/laybasic/layItemDelegates.h b/src/laybasic/laybasic/layItemDelegates.h index 6c860b2c2..ab0db7116 100644 --- a/src/laybasic/laybasic/layItemDelegates.h +++ b/src/laybasic/laybasic/layItemDelegates.h @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #ifndef HDR_layItemDelegates #define HDR_layItemDelegates @@ -103,3 +105,5 @@ private: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayerControlPanel.cc b/src/laybasic/laybasic/layLayerControlPanel.cc index 28f6cdacd..5be142020 100644 --- a/src/laybasic/laybasic/layLayerControlPanel.cc +++ b/src/laybasic/laybasic/layLayerControlPanel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include @@ -2340,3 +2341,5 @@ public: static tl::RegisteredClass config_decl (new LayerControlPanelPluginDeclaration (), -9, "LayerControlPanelPlugin"); } // namespace lay + +#endif diff --git a/src/laybasic/laybasic/layLayerControlPanel.h b/src/laybasic/laybasic/layLayerControlPanel.h index d3b322c88..8a7d6904a 100644 --- a/src/laybasic/laybasic/layLayerControlPanel.h +++ b/src/laybasic/laybasic/layLayerControlPanel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayerControlPanel #define HDR_layLayerControlPanel @@ -379,3 +380,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayerMappingWidget.cc b/src/laybasic/laybasic/layLayerMappingWidget.cc index e1f75ef47..1ec214ba4 100644 --- a/src/laybasic/laybasic/layLayerMappingWidget.cc +++ b/src/laybasic/laybasic/layLayerMappingWidget.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayerMappingWidget.h" #include "tlExceptions.h" @@ -259,3 +260,4 @@ LayerMappingWidget::current_tab_changed (int index) } +#endif diff --git a/src/laybasic/laybasic/layLayerMappingWidget.h b/src/laybasic/laybasic/layLayerMappingWidget.h index 2690b7a8a..b0898381e 100644 --- a/src/laybasic/laybasic/layLayerMappingWidget.h +++ b/src/laybasic/laybasic/layLayerMappingWidget.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayerMappingWidget #define HDR_layLayerMappingWidget @@ -98,3 +99,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayerToolbox.cc b/src/laybasic/laybasic/layLayerToolbox.cc index 4ceb5cf89..0be03095e 100644 --- a/src/laybasic/laybasic/layLayerToolbox.cc +++ b/src/laybasic/laybasic/layLayerToolbox.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayerToolbox.h" @@ -1467,3 +1468,4 @@ LayerToolbox::set_palette (const lay::LineStylePalette &p) } +#endif diff --git a/src/laybasic/laybasic/layLayerToolbox.h b/src/laybasic/laybasic/layLayerToolbox.h index fa65510a5..b9fd59d6e 100644 --- a/src/laybasic/laybasic/layLayerToolbox.h +++ b/src/laybasic/laybasic/layLayerToolbox.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayerToolbox #define HDR_layLayerToolbox @@ -351,3 +352,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayerTreeModel.cc b/src/laybasic/laybasic/layLayerTreeModel.cc index f478d96e6..741f26957 100644 --- a/src/laybasic/laybasic/layLayerTreeModel.cc +++ b/src/laybasic/laybasic/layLayerTreeModel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayerTreeModel.h" #include "layLayoutView.h" @@ -931,3 +932,5 @@ LayerTreeModel::index (lay::LayerPropertiesConstIterator iter, int column) const } } // namespace lay + +#endif diff --git a/src/laybasic/laybasic/layLayerTreeModel.h b/src/laybasic/laybasic/layLayerTreeModel.h index 28c0a8549..8eab10b20 100644 --- a/src/laybasic/laybasic/layLayerTreeModel.h +++ b/src/laybasic/laybasic/layLayerTreeModel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayerTreeModel #define HDR_layLayerTreeModel @@ -282,3 +283,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayoutCanvas.h b/src/laybasic/laybasic/layLayoutCanvas.h index 67466068b..9e6a2f169 100644 --- a/src/laybasic/laybasic/layLayoutCanvas.h +++ b/src/laybasic/laybasic/layLayoutCanvas.h @@ -35,6 +35,7 @@ #include "layViewOp.h" #include "layViewObject.h" #include "layBitmap.h" +#include "layColor.h" #include "layDrawing.h" #include "layDitherPattern.h" #include "layLineStyles.h" diff --git a/src/laybasic/laybasic/layLayoutPropertiesForm.cc b/src/laybasic/laybasic/layLayoutPropertiesForm.cc index ad5eaf135..00eeff068 100644 --- a/src/laybasic/laybasic/layLayoutPropertiesForm.cc +++ b/src/laybasic/laybasic/layLayoutPropertiesForm.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayoutPropertiesForm.h" #include "layLayoutView.h" @@ -206,5 +207,4 @@ END_PROTECTED } - - +#endif diff --git a/src/laybasic/laybasic/layLayoutPropertiesForm.h b/src/laybasic/laybasic/layLayoutPropertiesForm.h index 992ac207c..5a033616d 100644 --- a/src/laybasic/laybasic/layLayoutPropertiesForm.h +++ b/src/laybasic/laybasic/layLayoutPropertiesForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayoutPropertiesForm #define HDR_layLayoutPropertiesForm @@ -62,3 +63,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayoutStatisticsForm.cc b/src/laybasic/laybasic/layLayoutStatisticsForm.cc index e671fa0e5..a3e847ab5 100644 --- a/src/laybasic/laybasic/layLayoutStatisticsForm.cc +++ b/src/laybasic/laybasic/layLayoutStatisticsForm.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayoutStatisticsForm.h" #include "layLayoutView.h" @@ -848,5 +849,4 @@ LayoutStatisticsForm::layout_selected (int index) } - - +#endif diff --git a/src/laybasic/laybasic/layLayoutStatisticsForm.h b/src/laybasic/laybasic/layLayoutStatisticsForm.h index f85afb598..f8ee0835c 100644 --- a/src/laybasic/laybasic/layLayoutStatisticsForm.h +++ b/src/laybasic/laybasic/layLayoutStatisticsForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayoutStatisticsForm #define HDR_layLayoutStatisticsForm @@ -56,3 +57,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayoutViewConfigPages.cc b/src/laybasic/laybasic/layLayoutViewConfigPages.cc index 8463a6a5e..314abe80f 100644 --- a/src/laybasic/laybasic/layLayoutViewConfigPages.cc +++ b/src/laybasic/laybasic/layLayoutViewConfigPages.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayoutViewConfigPages.h" #include "laybasicConfig.h" @@ -1631,3 +1632,4 @@ static tl::RegisteredClass config_decl (new LayoutViewCo } +#endif diff --git a/src/laybasic/laybasic/layLayoutViewConfigPages.h b/src/laybasic/laybasic/layLayoutViewConfigPages.h index 04eb8ec4c..b2bae947e 100644 --- a/src/laybasic/laybasic/layLayoutViewConfigPages.h +++ b/src/laybasic/laybasic/layLayoutViewConfigPages.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayoutViewConfigPages #define HDR_layLayoutViewConfigPages @@ -358,3 +359,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLayoutViewFunctions.cc b/src/laybasic/laybasic/layLayoutViewFunctions.cc index 36bd854f3..0596afaed 100644 --- a/src/laybasic/laybasic/layLayoutViewFunctions.cc +++ b/src/laybasic/laybasic/layLayoutViewFunctions.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "layLayoutViewFunctions.h" #include "layLayoutView.h" #include "layCellSelectionForm.h" @@ -2253,3 +2255,5 @@ public: static tl::RegisteredClass config_decl (new LayoutViewPluginDeclaration (), -10, "LayoutViewPlugin"); } // namespace lay + +#endif diff --git a/src/laybasic/laybasic/layLayoutViewFunctions.h b/src/laybasic/laybasic/layLayoutViewFunctions.h index 37fdeb676..6f25e5eb7 100644 --- a/src/laybasic/laybasic/layLayoutViewFunctions.h +++ b/src/laybasic/laybasic/layLayoutViewFunctions.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLayoutViewFunctions #define HDR_layLayoutViewFunctions @@ -169,3 +170,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLibrariesView.cc b/src/laybasic/laybasic/layLibrariesView.cc index 0849a306b..2aac160a3 100644 --- a/src/laybasic/laybasic/layLibrariesView.cc +++ b/src/laybasic/laybasic/layLibrariesView.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include @@ -847,3 +848,5 @@ public: static tl::RegisteredClass config_decl (new LibraryViewPluginDeclaration (), -7, "LibraryViewPlugin"); } // namespace lay + +#endif diff --git a/src/laybasic/laybasic/layLibrariesView.h b/src/laybasic/laybasic/layLibrariesView.h index 48b650583..537556044 100644 --- a/src/laybasic/laybasic/layLibrariesView.h +++ b/src/laybasic/laybasic/layLibrariesView.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layLibrariesView #define HDR_layLibrariesView @@ -274,3 +275,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.cc b/src/laybasic/laybasic/layLoadLayoutOptionsDialog.cc index 6d3835299..08dbf35b0 100644 --- a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.cc +++ b/src/laybasic/laybasic/layLoadLayoutOptionsDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayoutView.h" #include "layLoadLayoutOptionsDialog.h" @@ -361,4 +362,4 @@ END_PROTECTED } - +#endif diff --git a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.h b/src/laybasic/laybasic/layLoadLayoutOptionsDialog.h index 2ea91d1a5..2ac954128 100644 --- a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.h +++ b/src/laybasic/laybasic/layLoadLayoutOptionsDialog.h @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #ifndef HDR_layLoadLayoutOptionsDialog #define HDR_layLoadLayoutOptionsDialog @@ -118,3 +118,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetExportDialog.cc b/src/laybasic/laybasic/layNetExportDialog.cc index 6838810c5..dc38fd9c8 100644 --- a/src/laybasic/laybasic/layNetExportDialog.cc +++ b/src/laybasic/laybasic/layNetExportDialog.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "layNetExportDialog.h" #include "layPlugin.h" #include "layDispatcher.h" @@ -213,3 +215,5 @@ NetExportDialog::exec_dialog (lay::Dispatcher *plugin_root) } } + +#endif diff --git a/src/laybasic/laybasic/layNetExportDialog.h b/src/laybasic/laybasic/layNetExportDialog.h index ee46befd4..d0ced5975 100644 --- a/src/laybasic/laybasic/layNetExportDialog.h +++ b/src/laybasic/laybasic/layNetExportDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetExportDialog #define HDR_layNetExportDialog @@ -87,3 +88,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetInfoDialog.cc b/src/laybasic/laybasic/layNetInfoDialog.cc index bd326b193..056bc2214 100644 --- a/src/laybasic/laybasic/layNetInfoDialog.cc +++ b/src/laybasic/laybasic/layNetInfoDialog.cc @@ -20,6 +20,8 @@ */ +#if defined(HAVE_QT) + #include "layNetInfoDialog.h" #include "tlXMLWriter.h" @@ -486,3 +488,5 @@ void NetInfoDialog::update_info_text () } } + +#endif diff --git a/src/laybasic/laybasic/layNetInfoDialog.h b/src/laybasic/laybasic/layNetInfoDialog.h index 3c3353125..dee3a88e7 100644 --- a/src/laybasic/laybasic/layNetInfoDialog.h +++ b/src/laybasic/laybasic/layNetInfoDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetInfoDialog #define HDR_layNetInfoDialog @@ -73,3 +74,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetlistBrowser.cc b/src/laybasic/laybasic/layNetlistBrowser.cc index d43501a38..33d312f3f 100644 --- a/src/laybasic/laybasic/layNetlistBrowser.cc +++ b/src/laybasic/laybasic/layNetlistBrowser.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "laybasicCommon.h" #include "layNetlistBrowserDialog.h" @@ -386,3 +387,4 @@ static tl::RegisteredClass config_decl (new NetlistBrows } +#endif diff --git a/src/laybasic/laybasic/layNetlistBrowser.h b/src/laybasic/laybasic/layNetlistBrowser.h index 96f333ce7..8e848d669 100644 --- a/src/laybasic/laybasic/layNetlistBrowser.h +++ b/src/laybasic/laybasic/layNetlistBrowser.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetlistBrowser #define HDR_layNetlistBrowser @@ -90,3 +91,4 @@ public: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetlistBrowserDialog.cc b/src/laybasic/laybasic/layNetlistBrowserDialog.cc index 820ebdf32..7247effd1 100644 --- a/src/laybasic/laybasic/layNetlistBrowserDialog.cc +++ b/src/laybasic/laybasic/layNetlistBrowserDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layNetlistBrowserDialog.h" #include "tlProgress.h" @@ -838,3 +839,4 @@ NetlistBrowserDialog::menu_activated (const std::string &symbol) } +#endif diff --git a/src/laybasic/laybasic/layNetlistBrowserDialog.h b/src/laybasic/laybasic/layNetlistBrowserDialog.h index ebebe1c14..e63d91957 100644 --- a/src/laybasic/laybasic/layNetlistBrowserDialog.h +++ b/src/laybasic/laybasic/layNetlistBrowserDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetlistBrowserDialog #define HDR_layNetlistBrowserDialog @@ -151,3 +152,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetlistBrowserModel.cc b/src/laybasic/laybasic/layNetlistBrowserModel.cc index 67e15af1a..cd1696a7b 100644 --- a/src/laybasic/laybasic/layNetlistBrowserModel.cc +++ b/src/laybasic/laybasic/layNetlistBrowserModel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layNetlistBrowserModel.h" #include "layIndexedNetlistModel.h" @@ -3020,3 +3021,4 @@ NetlistBrowserModel::set_item_visibility (QTreeView *view, bool show_all, bool w } +#endif diff --git a/src/laybasic/laybasic/layNetlistBrowserModel.h b/src/laybasic/laybasic/layNetlistBrowserModel.h index 6a43c954c..8a86696ba 100644 --- a/src/laybasic/laybasic/layNetlistBrowserModel.h +++ b/src/laybasic/laybasic/layNetlistBrowserModel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetlistBrowserModel #define HDR_layNetlistBrowserModel @@ -343,3 +344,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetlistBrowserPage.cc b/src/laybasic/laybasic/layNetlistBrowserPage.cc index 1909956f9..1085d4c1e 100644 --- a/src/laybasic/laybasic/layNetlistBrowserPage.cc +++ b/src/laybasic/laybasic/layNetlistBrowserPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layNetlistBrowserPage.h" #include "layNetlistBrowserModel.h" @@ -1458,3 +1459,4 @@ NetlistBrowserPage::export_nets (const std::vector *nets) } +#endif diff --git a/src/laybasic/laybasic/layNetlistBrowserPage.h b/src/laybasic/laybasic/layNetlistBrowserPage.h index c268baaa5..ac135245d 100644 --- a/src/laybasic/laybasic/layNetlistBrowserPage.h +++ b/src/laybasic/laybasic/layNetlistBrowserPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetlistBrowserPage #define HDR_layNetlistBrowserPage @@ -269,3 +270,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetlistBrowserTreeModel.cc b/src/laybasic/laybasic/layNetlistBrowserTreeModel.cc index c88954df6..cc13503c0 100644 --- a/src/laybasic/laybasic/layNetlistBrowserTreeModel.cc +++ b/src/laybasic/laybasic/layNetlistBrowserTreeModel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layNetlistBrowserTreeModel.h" #include "layIndexedNetlistModel.h" @@ -447,3 +448,5 @@ NetlistBrowserTreeModel::rowCount (const QModelIndex &parent) const } } + +#endif diff --git a/src/laybasic/laybasic/layNetlistBrowserTreeModel.h b/src/laybasic/laybasic/layNetlistBrowserTreeModel.h index d17c0bff2..19fdf20b4 100644 --- a/src/laybasic/laybasic/layNetlistBrowserTreeModel.h +++ b/src/laybasic/laybasic/layNetlistBrowserTreeModel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetlistBrowserTreeModel #define HDR_layNetlistBrowserTreeModel @@ -103,3 +104,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layNetlistCrossReferenceModel.cc b/src/laybasic/laybasic/layNetlistCrossReferenceModel.cc index 17ced1c64..ca0a4682b 100644 --- a/src/laybasic/laybasic/layNetlistCrossReferenceModel.cc +++ b/src/laybasic/laybasic/layNetlistCrossReferenceModel.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layNetlistCrossReferenceModel.h" @@ -800,3 +801,5 @@ std::string NetlistCrossReferenceModel::subcircuit_status_hint (const circuit_pa } } + +#endif diff --git a/src/laybasic/laybasic/layNetlistCrossReferenceModel.h b/src/laybasic/laybasic/layNetlistCrossReferenceModel.h index 8ad542411..01475b35b 100644 --- a/src/laybasic/laybasic/layNetlistCrossReferenceModel.h +++ b/src/laybasic/laybasic/layNetlistCrossReferenceModel.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layNetlistCrossReference #define HDR_layNetlistCrossReference @@ -119,3 +120,5 @@ public: } #endif + +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layPluginConfigPage.cc b/src/laybasic/laybasic/layPluginConfigPage.cc index 680e76f01..2cc95aa98 100644 --- a/src/laybasic/laybasic/layPluginConfigPage.cc +++ b/src/laybasic/laybasic/layPluginConfigPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "laybasicCommon.h" @@ -31,3 +32,5 @@ namespace lay // .. nothing yet .. } + +#endif diff --git a/src/laybasic/laybasic/layPluginConfigPage.h b/src/laybasic/laybasic/layPluginConfigPage.h index e190ac15a..fa3362281 100644 --- a/src/laybasic/laybasic/layPluginConfigPage.h +++ b/src/laybasic/laybasic/layPluginConfigPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layPluginConfigPage #define HDR_layPluginConfigPage @@ -80,3 +81,4 @@ public: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layProperties.cc b/src/laybasic/laybasic/layProperties.cc index 8f9696e13..fa3ca2360 100644 --- a/src/laybasic/laybasic/layProperties.cc +++ b/src/laybasic/laybasic/layProperties.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layProperties.h" @@ -41,3 +42,4 @@ PropertiesPage::~PropertiesPage () } +#endif diff --git a/src/laybasic/laybasic/layProperties.h b/src/laybasic/laybasic/layProperties.h index 36124cc7d..07c6ffe98 100644 --- a/src/laybasic/laybasic/layProperties.h +++ b/src/laybasic/laybasic/layProperties.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layProperties #define HDR_layProperties @@ -237,3 +238,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layPropertiesDialog.cc b/src/laybasic/laybasic/layPropertiesDialog.cc index b42d3c367..09d8a697b 100644 --- a/src/laybasic/laybasic/layPropertiesDialog.cc +++ b/src/laybasic/laybasic/layPropertiesDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layPropertiesDialog.h" @@ -349,3 +350,4 @@ PropertiesDialog::reject () } +#endif diff --git a/src/laybasic/laybasic/layPropertiesDialog.h b/src/laybasic/laybasic/layPropertiesDialog.h index 4aad302c6..85faaf991 100644 --- a/src/laybasic/laybasic/layPropertiesDialog.h +++ b/src/laybasic/laybasic/layPropertiesDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layPropertiesDialog #define HDR_layPropertiesDialog @@ -103,3 +104,4 @@ protected: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layQtTools.cc b/src/laybasic/laybasic/layQtTools.cc index 70a0f6b22..66ac0ee61 100644 --- a/src/laybasic/laybasic/layQtTools.cc +++ b/src/laybasic/laybasic/layQtTools.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layQtTools.h" #include "tlString.h" @@ -219,3 +220,4 @@ SignalBlocker::~SignalBlocker () } +#endif diff --git a/src/laybasic/laybasic/layQtTools.h b/src/laybasic/laybasic/layQtTools.h index fe0a65557..7b49c8aff 100644 --- a/src/laybasic/laybasic/layQtTools.h +++ b/src/laybasic/laybasic/layQtTools.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layQtTools #define HDR_layQtTools @@ -114,3 +115,4 @@ typedef QSignalBlocker SignalBlocker; #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layRedrawThreadWorker.cc b/src/laybasic/laybasic/layRedrawThreadWorker.cc index da0905be8..2a7614177 100644 --- a/src/laybasic/laybasic/layRedrawThreadWorker.cc +++ b/src/laybasic/laybasic/layRedrawThreadWorker.cc @@ -23,6 +23,7 @@ #include "layRedrawThreadWorker.h" #include "layRedrawThread.h" +#include "layBitmap.h" namespace lay { diff --git a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc b/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc index c1fc62cb4..ff5b28002 100644 --- a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc +++ b/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layLayoutView.h" #include "laySaveLayoutOptionsDialog.h" @@ -553,3 +554,4 @@ SaveLayoutAsOptionsDialog::fmt_cbx_changed (int index) } +#endif diff --git a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.h b/src/laybasic/laybasic/laySaveLayoutOptionsDialog.h index a482e90f5..a8dcb6554 100644 --- a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.h +++ b/src/laybasic/laybasic/laySaveLayoutOptionsDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_laySaveLayoutOptionsDialog #define HDR_laySaveLayoutOptionsDialog @@ -103,3 +104,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/laySelectCellViewForm.cc b/src/laybasic/laybasic/laySelectCellViewForm.cc index 7ef98e984..1ae4b1da7 100644 --- a/src/laybasic/laybasic/laySelectCellViewForm.cc +++ b/src/laybasic/laybasic/laySelectCellViewForm.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "laySelectCellViewForm.h" #include "layCellView.h" @@ -134,3 +135,4 @@ SelectCellViewForm::select_all () } +#endif diff --git a/src/laybasic/laybasic/laySelectCellViewForm.h b/src/laybasic/laybasic/laySelectCellViewForm.h index 9dd053bc4..5abd7efe2 100644 --- a/src/laybasic/laybasic/laySelectCellViewForm.h +++ b/src/laybasic/laybasic/laySelectCellViewForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_SelectCellViewForm #define HDR_SelectCellViewForm @@ -90,3 +91,4 @@ public slots: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/laySelectLineStyleForm.cc b/src/laybasic/laybasic/laySelectLineStyleForm.cc index df64c51b9..cb32fd06b 100644 --- a/src/laybasic/laybasic/laySelectLineStyleForm.cc +++ b/src/laybasic/laybasic/laySelectLineStyleForm.cc @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #include "laySelectLineStyleForm.h" #include "ui_SelectLineStyleForm.h" @@ -133,3 +133,4 @@ SelectLineStyleForm::sel_changed (QListWidgetItem *citem, QListWidgetItem *) } +#endif diff --git a/src/laybasic/laybasic/laySelectLineStyleForm.h b/src/laybasic/laybasic/laySelectLineStyleForm.h index 971e244aa..9cb159e2a 100644 --- a/src/laybasic/laybasic/laySelectLineStyleForm.h +++ b/src/laybasic/laybasic/laySelectLineStyleForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_laySelectLineStyleForm #define HDR_laySelectLineStyleForm @@ -72,3 +73,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/laySelectStippleForm.cc b/src/laybasic/laybasic/laySelectStippleForm.cc index 97e954faf..76f9354a4 100644 --- a/src/laybasic/laybasic/laySelectStippleForm.cc +++ b/src/laybasic/laybasic/laySelectStippleForm.cc @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #include "laySelectStippleForm.h" #include "ui_SelectStippleForm.h" @@ -133,3 +133,4 @@ SelectStippleForm::sel_changed (QListWidgetItem *citem, QListWidgetItem *) } +#endif diff --git a/src/laybasic/laybasic/laySelectStippleForm.h b/src/laybasic/laybasic/laySelectStippleForm.h index a6432e460..4769914fc 100644 --- a/src/laybasic/laybasic/laySelectStippleForm.h +++ b/src/laybasic/laybasic/laySelectStippleForm.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_laySelectStippleForm #define HDR_laySelectStippleForm @@ -72,3 +73,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layStream.cc b/src/laybasic/laybasic/layStream.cc index 64a59d6c6..0da6346ec 100644 --- a/src/laybasic/laybasic/layStream.cc +++ b/src/laybasic/laybasic/layStream.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layStream.h" #include "layPlugin.h" @@ -84,3 +85,4 @@ const StreamWriterPluginDeclaration *StreamWriterPluginDeclaration::plugin_for_f } +#endif diff --git a/src/laybasic/laybasic/layStream.h b/src/laybasic/laybasic/layStream.h index 55d4fde00..c6ba13660 100644 --- a/src/laybasic/laybasic/layStream.h +++ b/src/laybasic/laybasic/layStream.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layStream_h #define HDR_layStream_h @@ -267,3 +268,4 @@ public: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layTechnology.cc b/src/laybasic/laybasic/layTechnology.cc index 5f03acdce..a7f8de11b 100644 --- a/src/laybasic/laybasic/layTechnology.cc +++ b/src/laybasic/laybasic/layTechnology.cc @@ -20,7 +20,10 @@ */ +#if defined(HAVE_QT) #include "layTechnology.h" // .. nothing yet .. + +#endif diff --git a/src/laybasic/laybasic/layTechnology.h b/src/laybasic/laybasic/layTechnology.h index a4d25fccc..c7168b313 100644 --- a/src/laybasic/laybasic/layTechnology.h +++ b/src/laybasic/laybasic/layTechnology.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layTechnology #define HDR_layTechnology @@ -137,3 +138,4 @@ public: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layTipDialog.cc b/src/laybasic/laybasic/layTipDialog.cc index fd9c27493..c7c86a923 100644 --- a/src/laybasic/laybasic/layTipDialog.cc +++ b/src/laybasic/laybasic/layTipDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "layTipDialog.h" #include "laybasicConfig.h" @@ -217,3 +218,4 @@ TipDialog::~TipDialog () } +#endif diff --git a/src/laybasic/laybasic/layTipDialog.h b/src/laybasic/laybasic/layTipDialog.h index dabc68318..fc6ffaf27 100644 --- a/src/laybasic/laybasic/layTipDialog.h +++ b/src/laybasic/laybasic/layTipDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layTipDialog #define HDR_layTipDialog @@ -110,3 +111,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layWidgets.cc b/src/laybasic/laybasic/layWidgets.cc index 3335861a2..aa31b339a 100644 --- a/src/laybasic/laybasic/layWidgets.cc +++ b/src/laybasic/laybasic/layWidgets.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include #include @@ -1314,3 +1315,5 @@ InteractiveListWidget::refresh_flags () } } + +#endif diff --git a/src/laybasic/laybasic/layWidgets.h b/src/laybasic/laybasic/layWidgets.h index 6020c78a9..eb3ef708f 100644 --- a/src/laybasic/laybasic/layWidgets.h +++ b/src/laybasic/laybasic/layWidgets.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_layWidgets #define HDR_layWidgets @@ -524,3 +525,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/laybasic.pro b/src/laybasic/laybasic/laybasic.pro index 421298aa9..b0750a4e6 100644 --- a/src/laybasic/laybasic/laybasic.pro +++ b/src/laybasic/laybasic/laybasic.pro @@ -82,7 +82,11 @@ DEFINES += MAKE_LAYBASIC_LIBRARY laybasicResources.qrc \ layLayoutStatistics.qrc \ - SOURCES = \ +} + +# Disabled without Qt: + +SOURCES = \ gsiDeclLayDialogs.cc \ gsiDeclLayMenu.cc \ gsiDeclLayNetlistBrowserDialog.cc \ @@ -153,7 +157,9 @@ DEFINES += MAKE_LAYBASIC_LIBRARY rdbMarkerBrowserDialog.cc \ rdbMarkerBrowserPage.cc \ - HEADERS = \ +# Disabled without Qt: + +HEADERS = \ gtf.h \ layAbstractMenu.h \ layBackgroundAwareTreeStyle.h \ @@ -223,7 +229,7 @@ DEFINES += MAKE_LAYBASIC_LIBRARY rdbMarkerBrowserDialog.h \ rdbMarkerBrowserPage.h \ -} +# Enabled without Qt: SOURCES += \ gsiDeclLayLayers.cc \ @@ -231,6 +237,7 @@ SOURCES += \ gsiDeclLayMarker.cc \ gsiDeclLayPlugin.cc \ gsiDeclLayPixelBuffer.cc \ + laybasicForceLink.cc \ layAnnotationShapes.cc \ layBitmap.cc \ layBitmapRenderer.cc \ @@ -278,7 +285,10 @@ SOURCES += \ layViewport.cc \ layZoomBox.cc \ +# Enabled without Qt: + HEADERS += \ + laybasicForceLink.h \ layAnnotationShapes.h \ layBitmap.h \ layBitmapRenderer.h \ diff --git a/src/laybasic/laybasic/laybasicConfig.h b/src/laybasic/laybasic/laybasicConfig.h index d9e7bd5ad..0b84bf38f 100644 --- a/src/laybasic/laybasic/laybasicConfig.h +++ b/src/laybasic/laybasic/laybasicConfig.h @@ -20,7 +20,6 @@ */ - #ifndef HDR_laybasicConfig #define HDR_laybasicConfig @@ -147,4 +146,3 @@ static const std::string cfg_guiding_shape_vertex_size ("guiding-shape-vertex-si } #endif - diff --git a/src/laybasic/laybasic/laybasicForceLink.cc b/src/laybasic/laybasic/laybasicForceLink.cc new file mode 100644 index 000000000..9db8fe64f --- /dev/null +++ b/src/laybasic/laybasic/laybasicForceLink.cc @@ -0,0 +1,32 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "laybasicForceLink.h" + +namespace laybasic +{ + int _force_link_f () + { + return 0; + } +} + diff --git a/src/laybasic/laybasic/laybasicForceLink.h b/src/laybasic/laybasic/laybasicForceLink.h new file mode 100644 index 000000000..1f84613ce --- /dev/null +++ b/src/laybasic/laybasic/laybasicForceLink.h @@ -0,0 +1,40 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#ifndef HDR_laybasicForceLink +#define HDR_laybasicForceLink + +#include "laybasicCommon.h" + +/** + * @file Include this function to force linking of the lay module + */ + +namespace laybasic +{ + LAYBASIC_PUBLIC int _force_link_f (); + static int _force_link_target = _force_link_f (); +} + +#endif + diff --git a/src/laybasic/laybasic/rdbInfoWidget.cc b/src/laybasic/laybasic/rdbInfoWidget.cc index f692ab093..f702c0ed8 100644 --- a/src/laybasic/laybasic/rdbInfoWidget.cc +++ b/src/laybasic/laybasic/rdbInfoWidget.cc @@ -21,6 +21,8 @@ */ +#if defined(HAVE_QT) + #include "rdbInfoWidget.h" #include @@ -63,3 +65,4 @@ InfoWidget::loadResource (int type, const QUrl &name) } +#endif diff --git a/src/laybasic/laybasic/rdbInfoWidget.h b/src/laybasic/laybasic/rdbInfoWidget.h index b9198970b..447978656 100644 --- a/src/laybasic/laybasic/rdbInfoWidget.h +++ b/src/laybasic/laybasic/rdbInfoWidget.h @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #ifndef HDR_rdbInfoWidget #define HDR_rdbInfoWidget @@ -52,3 +52,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/rdbMarkerBrowser.cc b/src/laybasic/laybasic/rdbMarkerBrowser.cc index 2a7e9928a..b0093decf 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowser.cc +++ b/src/laybasic/laybasic/rdbMarkerBrowser.cc @@ -20,7 +20,7 @@ */ - +#if defined(HAVE_QT) #include "rdbMarkerBrowserDialog.h" @@ -312,3 +312,4 @@ static tl::RegisteredClass config_decl (new MarkerBrowse } +#endif diff --git a/src/laybasic/laybasic/rdbMarkerBrowser.h b/src/laybasic/laybasic/rdbMarkerBrowser.h index b2a14a25b..fd39a132e 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowser.h +++ b/src/laybasic/laybasic/rdbMarkerBrowser.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_rdbMarkerBrowser #define HDR_rdbMarkerBrowser @@ -86,3 +87,4 @@ public: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc b/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc index c85b40024..644d0c089 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc +++ b/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "rdbMarkerBrowserDialog.h" #include "rdb.h" @@ -902,3 +903,4 @@ MarkerBrowserDialog::menu_activated (const std::string &symbol) } +#endif diff --git a/src/laybasic/laybasic/rdbMarkerBrowserDialog.h b/src/laybasic/laybasic/rdbMarkerBrowserDialog.h index 5e0bd782e..a8c6703d1 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserDialog.h +++ b/src/laybasic/laybasic/rdbMarkerBrowserDialog.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_rdbMarkerBrowserDialog #define HDR_rdbMarkerBrowserDialog @@ -99,3 +100,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc b/src/laybasic/laybasic/rdbMarkerBrowserPage.cc index df28158db..2efedbc0f 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc +++ b/src/laybasic/laybasic/rdbMarkerBrowserPage.cc @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #include "rdbMarkerBrowserPage.h" #include "rdb.h" @@ -3163,3 +3164,4 @@ MarkerBrowserPage::eventFilter (QObject *watched, QEvent *event) } +#endif diff --git a/src/laybasic/laybasic/rdbMarkerBrowserPage.h b/src/laybasic/laybasic/rdbMarkerBrowserPage.h index f879884a6..2982cb045 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserPage.h +++ b/src/laybasic/laybasic/rdbMarkerBrowserPage.h @@ -20,6 +20,7 @@ */ +#if defined(HAVE_QT) #ifndef HDR_rdbMarkerBrowserPage #define HDR_rdbMarkerBrowserPage @@ -225,3 +226,4 @@ private: #endif +#endif // defined(HAVE_QT) diff --git a/src/lym/lym/lymForceLink.cc b/src/lym/lym/lymForceLink.cc new file mode 100644 index 000000000..2f1b61cf7 --- /dev/null +++ b/src/lym/lym/lymForceLink.cc @@ -0,0 +1,32 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warrlymy of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "lymForceLink.h" + +namespace lym +{ + int _force_link_f () + { + return 0; + } +} + diff --git a/src/lym/lym/lymForceLink.h b/src/lym/lym/lymForceLink.h new file mode 100644 index 000000000..f47b70955 --- /dev/null +++ b/src/lym/lym/lymForceLink.h @@ -0,0 +1,40 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warrlymy of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#ifndef HDR_lymForceLink +#define HDR_lymForceLink + +#include "lymCommon.h" + +/** + * @file Include this function to force linking of the lym module + */ + +namespace lym +{ + LYM_PUBLIC int _force_link_f (); + static int _force_link_target = _force_link_f (); +} + +#endif + diff --git a/src/pymod/__init__.py.qtless b/src/pymod/__init__.py.qtless index 776d25ace..782df0624 100644 --- a/src/pymod/__init__.py.qtless +++ b/src/pymod/__init__.py.qtless @@ -1,4 +1,4 @@ # klayout library definition file -__all__ = [ "tl", "db", "lib", "rdb" ] +__all__ = [ "tl", "db", "lib", "rdb", "lay" ] diff --git a/src/pymod/ant/ant.pro b/src/pymod/ant/ant.pro new file mode 100644 index 000000000..6df7c0d5a --- /dev/null +++ b/src/pymod/ant/ant.pro @@ -0,0 +1,12 @@ + +TARGET = ant + +include($$PWD/../pymod.pri) + +SOURCES = \ + antMain.cc \ + +HEADERS += \ + +LIBS += -lklayout_ant + diff --git a/src/pymod/ant/antMain.cc b/src/pymod/ant/antMain.cc new file mode 100644 index 000000000..1ec947f0d --- /dev/null +++ b/src/pymod/ant/antMain.cc @@ -0,0 +1,28 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "../pymodHelper.h" + +// to force linking of the ant module +# include "../../ant/ant/antForceLink.h" + +DEFINE_PYMOD(antcore, "ant", "KLayout core module 'ant'") diff --git a/src/pymod/distutils_src/klayout/lay/__init__.py b/src/pymod/distutils_src/klayout/lay/__init__.py new file mode 100644 index 000000000..ee976c13d --- /dev/null +++ b/src/pymod/distutils_src/klayout/lay/__init__.py @@ -0,0 +1,12 @@ +import klayout.laycore +import klayout.antcore +import klayout.edtcore +import klayout.imgcore +import klayout.lymcore +from klayout.laycore import * +from klayout.antcore import * +from klayout.edtcore import * +from klayout.imgcore import * +from klayout.laycore import * + +__all__ = klayout.laycore.__all__ + klayout.antcore.__all__ + klayout.edtcore.__all__ + klayout.imgcore.__all__ + klayout.laycore.__all__ diff --git a/src/pymod/edt/edt.pro b/src/pymod/edt/edt.pro new file mode 100644 index 000000000..f2b8fe8b4 --- /dev/null +++ b/src/pymod/edt/edt.pro @@ -0,0 +1,12 @@ + +TARGET = edt + +include($$PWD/../pymod.pri) + +SOURCES = \ + edtMain.cc \ + +HEADERS += \ + +LIBS += -lklayout_edt + diff --git a/src/pymod/edt/edtMain.cc b/src/pymod/edt/edtMain.cc new file mode 100644 index 000000000..5ae69e64b --- /dev/null +++ b/src/pymod/edt/edtMain.cc @@ -0,0 +1,28 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warrlymy of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "../pymodHelper.h" + +// to force linking of the edt module +# include "../../edt/edt/edtForceLink.h" + +DEFINE_PYMOD(edtcore, "edt", "KLayout core module 'edt'") diff --git a/src/pymod/edt/lay.pro b/src/pymod/edt/lay.pro new file mode 100644 index 000000000..5555294e0 --- /dev/null +++ b/src/pymod/edt/lay.pro @@ -0,0 +1,12 @@ + +TARGET = lay + +include($$PWD/../pymod.pri) + +SOURCES = \ + layMain.cc \ + +HEADERS += \ + +LIBS += -lklayout_lay + diff --git a/src/pymod/edt/layMain.cc b/src/pymod/edt/layMain.cc new file mode 100644 index 000000000..b68e22169 --- /dev/null +++ b/src/pymod/edt/layMain.cc @@ -0,0 +1,37 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "../pymodHelper.h" + +#if defined(HAVE_QT) +// to force linking of the lay module +# include "../../lay/lay/layForceLink.h" +#else +// to force linking of the laybasic module +// NOTE: without Qt we can only utilize the core view classes from laybasic +# include "../../laybasic/laybasic/laybasicForceLink.h" +#endif + +// NOTE: img, ant, edt and rdb don't need to be force-linked +// as they are hard-linked by lay + +DEFINE_PYMOD(laycore, "lay", "KLayout core module 'lay'") diff --git a/src/pymod/img/img.pro b/src/pymod/img/img.pro new file mode 100644 index 000000000..ca520540a --- /dev/null +++ b/src/pymod/img/img.pro @@ -0,0 +1,12 @@ + +TARGET = img + +include($$PWD/../pymod.pri) + +SOURCES = \ + imgMain.cc \ + +HEADERS += \ + +LIBS += -lklayout_img + diff --git a/src/pymod/img/imgMain.cc b/src/pymod/img/imgMain.cc new file mode 100644 index 000000000..db7eb4d79 --- /dev/null +++ b/src/pymod/img/imgMain.cc @@ -0,0 +1,28 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warrimgy of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "../pymodHelper.h" + +// to force linking of the img module +# include "../../img/img/imgForceLink.h" + +DEFINE_PYMOD(imgcore, "img", "KLayout core module 'img'") diff --git a/src/pymod/img/lay.pro b/src/pymod/img/lay.pro new file mode 100644 index 000000000..5555294e0 --- /dev/null +++ b/src/pymod/img/lay.pro @@ -0,0 +1,12 @@ + +TARGET = lay + +include($$PWD/../pymod.pri) + +SOURCES = \ + layMain.cc \ + +HEADERS += \ + +LIBS += -lklayout_lay + diff --git a/src/pymod/img/layMain.cc b/src/pymod/img/layMain.cc new file mode 100644 index 000000000..b68e22169 --- /dev/null +++ b/src/pymod/img/layMain.cc @@ -0,0 +1,37 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "../pymodHelper.h" + +#if defined(HAVE_QT) +// to force linking of the lay module +# include "../../lay/lay/layForceLink.h" +#else +// to force linking of the laybasic module +// NOTE: without Qt we can only utilize the core view classes from laybasic +# include "../../laybasic/laybasic/laybasicForceLink.h" +#endif + +// NOTE: img, ant, edt and rdb don't need to be force-linked +// as they are hard-linked by lay + +DEFINE_PYMOD(laycore, "lay", "KLayout core module 'lay'") diff --git a/src/pymod/lay/layMain.cc b/src/pymod/lay/layMain.cc index 6d13a6ab0..1e1de16bc 100644 --- a/src/pymod/lay/layMain.cc +++ b/src/pymod/lay/layMain.cc @@ -22,10 +22,13 @@ #include "../pymodHelper.h" +#if defined(HAVE_QT) // to force linking of the lay module -#include "../../lay/lay/layForceLink.h" +# include "../../lay/lay/layForceLink.h" +#else +// to force linking of the laybasic module +// NOTE: without Qt we can only utilize the core view classes from laybasic +# include "../../laybasic/laybasic/laybasicForceLink.h" +#endif -// NOTE: img, ant, edt and rdb don't need to be force-linked -// as they are hard-linked by lay - -DEFINE_PYMOD(lay, "lay", "KLayout core module 'lay'") +DEFINE_PYMOD(laycore, "lay", "KLayout core module 'lay'") diff --git a/src/pymod/lym/lym.pro b/src/pymod/lym/lym.pro new file mode 100644 index 000000000..4e1e5983e --- /dev/null +++ b/src/pymod/lym/lym.pro @@ -0,0 +1,12 @@ + +TARGET = lym + +include($$PWD/../pymod.pri) + +SOURCES = \ + lymMain.cc \ + +HEADERS += \ + +LIBS += -lklayout_lym + diff --git a/src/pymod/lym/lymMain.cc b/src/pymod/lym/lymMain.cc new file mode 100644 index 000000000..0d34f46ca --- /dev/null +++ b/src/pymod/lym/lymMain.cc @@ -0,0 +1,28 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warrlymy of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "../pymodHelper.h" + +// to force linking of the lym module +# include "../../lym/lym/lymForceLink.h" + +DEFINE_PYMOD(lymcore, "lym", "KLayout core module 'lym'") diff --git a/src/pymod/pymod.pro b/src/pymod/pymod.pro index cb205bcdb..5b2debe92 100644 --- a/src/pymod/pymod.pro +++ b/src/pymod/pymod.pro @@ -7,11 +7,14 @@ SUBDIRS = \ tl \ rdb \ lib \ + lay \ + lym \ + ant \ + edt \ + img \ !equals(HAVE_QT, "0") { - SUBDIRS += lay - equals(HAVE_QTBINDINGS, "1") { SUBDIRS += \