diff --git a/setup.py b/setup.py index d2105dd64..305249a07 100644 --- a/setup.py +++ b/setup.py @@ -287,12 +287,12 @@ class Config(object): if platform.system() == "Windows": if mod == "_tl": return [ "libcurl", "expat", "pthreadVCE2", "zlib", "wsock32" ] - elif mod == "_lay": + elif mod == "_laybasic": return [ "libpng" ] else: if mod == "_tl": return ['curl', 'expat'] - elif mod == "_lay": + elif mod == "_laybasic": return [ 'png' ] return [] diff --git a/src/laybasic/laybasic/laybasicForceLink.h b/src/laybasic/laybasic/laybasicForceLink.h index 1f84613ce..af2188be3 100644 --- a/src/laybasic/laybasic/laybasicForceLink.h +++ b/src/laybasic/laybasic/laybasicForceLink.h @@ -27,7 +27,7 @@ #include "laybasicCommon.h" /** - * @file Include this function to force linking of the lay module + * @file Include this function to force linking of the laybasic module */ namespace laybasic diff --git a/src/layui/layui/layui.pro b/src/layui/layui/layui.pro index 0b2e9f730..086291e28 100644 --- a/src/layui/layui/layui.pro +++ b/src/layui/layui/layui.pro @@ -79,122 +79,124 @@ RESOURCES = \ layLayoutStatistics.qrc \ SOURCES = \ - gsiDeclLayDialogs.cc \ - gsiDeclLayMenu.cc \ - gsiDeclLayNetlistBrowserDialog.cc \ - gsiDeclLayStream.cc \ - layBackgroundAwareTreeStyle.cc \ - layBookmarkManagementForm.cc \ - layBookmarksView.cc \ - layBrowseInstancesForm.cc \ - layBrowseShapesForm.cc \ - layBrowser.cc \ - layBrowserDialog.cc \ - layBrowserPanel.cc \ - layBusy.cc \ - layCellSelectionForm.cc \ - layCellTreeModel.cc \ - layConfigurationDialog.cc \ - layDialogs.cc \ - layEditLineStyleWidget.cc \ - layEditLineStylesForm.cc \ - layEditStippleWidget.cc \ - layEditStipplesForm.cc \ - layEditorOptionsFrame.cc \ - layEditorOptionsPage.cc \ - layEditorOptionsPages.cc \ - layFileDialog.cc \ - layGenericSyntaxHighlighter.cc \ - layHierarchyControlPanel.cc \ - layIndexedNetlistModel.cc \ - layItemDelegates.cc \ - layLayerControlPanel.cc \ - layLayerMappingWidget.cc \ - layLayerToolbox.cc \ - layLayerTreeModel.cc \ - layLayoutPropertiesForm.cc \ - layLayoutStatisticsForm.cc \ - layLayoutViewConfigPages.cc \ - layLayoutViewFunctions.cc \ - layLibrariesView.cc \ - layLoadLayoutOptionsDialog.cc \ - layNetExportDialog.cc \ - layNetInfoDialog.cc \ - layNetlistBrowser.cc \ - layNetlistBrowserDialog.cc \ - layNetlistBrowserModel.cc \ - layNetlistBrowserPage.cc \ - layNetlistBrowserTreeModel.cc \ - layNetlistCrossReferenceModel.cc \ - layQtTools.cc \ - laySaveLayoutOptionsDialog.cc \ - laySelectCellViewForm.cc \ - laySelectLineStyleForm.cc \ - laySelectStippleForm.cc \ - layTechnology.cc \ - layTipDialog.cc \ - layWidgets.cc \ - rdbInfoWidget.cc \ - rdbMarkerBrowser.cc \ - rdbMarkerBrowserDialog.cc \ - rdbMarkerBrowserPage.cc \ + gsiDeclLayDialogs.cc \ + gsiDeclLayMenu.cc \ + gsiDeclLayNetlistBrowserDialog.cc \ + gsiDeclLayStream.cc \ + layuiForceLink.cc \ + layBackgroundAwareTreeStyle.cc \ + layBookmarkManagementForm.cc \ + layBookmarksView.cc \ + layBrowseInstancesForm.cc \ + layBrowseShapesForm.cc \ + layBrowser.cc \ + layBrowserDialog.cc \ + layBrowserPanel.cc \ + layBusy.cc \ + layCellSelectionForm.cc \ + layCellTreeModel.cc \ + layConfigurationDialog.cc \ + layDialogs.cc \ + layEditLineStyleWidget.cc \ + layEditLineStylesForm.cc \ + layEditStippleWidget.cc \ + layEditStipplesForm.cc \ + layEditorOptionsFrame.cc \ + layEditorOptionsPage.cc \ + layEditorOptionsPages.cc \ + layFileDialog.cc \ + layGenericSyntaxHighlighter.cc \ + layHierarchyControlPanel.cc \ + layIndexedNetlistModel.cc \ + layItemDelegates.cc \ + layLayerControlPanel.cc \ + layLayerMappingWidget.cc \ + layLayerToolbox.cc \ + layLayerTreeModel.cc \ + layLayoutPropertiesForm.cc \ + layLayoutStatisticsForm.cc \ + layLayoutViewConfigPages.cc \ + layLayoutViewFunctions.cc \ + layLibrariesView.cc \ + layLoadLayoutOptionsDialog.cc \ + layNetExportDialog.cc \ + layNetInfoDialog.cc \ + layNetlistBrowser.cc \ + layNetlistBrowserDialog.cc \ + layNetlistBrowserModel.cc \ + layNetlistBrowserPage.cc \ + layNetlistBrowserTreeModel.cc \ + layNetlistCrossReferenceModel.cc \ + layQtTools.cc \ + laySaveLayoutOptionsDialog.cc \ + laySelectCellViewForm.cc \ + laySelectLineStyleForm.cc \ + laySelectStippleForm.cc \ + layTechnology.cc \ + layTipDialog.cc \ + layWidgets.cc \ + rdbInfoWidget.cc \ + rdbMarkerBrowser.cc \ + rdbMarkerBrowserDialog.cc \ + rdbMarkerBrowserPage.cc \ HEADERS = \ - layBackgroundAwareTreeStyle.h \ - layBookmarkManagementForm.h \ - layBookmarksView.h \ - layBrowseInstancesForm.h \ - layBrowseShapesForm.h \ - layBrowser.h \ - layBrowserDialog.h \ - layBrowserPanel.h \ - layBusy.h \ - layCellSelectionForm.h \ - layCellTreeModel.h \ - layConfigurationDialog.h \ - layDialogs.h \ - layEditLineStyleWidget.h \ - layEditLineStylesForm.h \ - layEditStippleWidget.h \ - layEditStipplesForm.h \ - layEditorOptionsFrame.h \ - layEditorOptionsPage.h \ - layEditorOptionsPages.h \ - layFileDialog.h \ - layGenericSyntaxHighlighter.h \ - layHierarchyControlPanel.h \ - layIndexedNetlistModel.h \ - layItemDelegates.h \ - layLayerControlPanel.h \ - layLayerMappingWidget.h \ - layLayerToolbox.h \ - layLayerTreeModel.h \ - layLayoutPropertiesForm.h \ - layLayoutStatisticsForm.h \ - layLayoutViewConfigPages.h \ - layLayoutViewFunctions.h \ - layLibrariesView.h \ - layLoadLayoutOptionsDialog.h \ - layNetExportDialog.h \ - layNetInfoDialog.h \ - layNetlistBrowser.h \ - layNetlistBrowserDialog.h \ - layNetlistBrowserModel.h \ - layNetlistBrowserPage.h \ - layNetlistBrowserTreeModel.h \ - layNetlistCrossReferenceModel.h \ - layQtTools.h \ - laySaveLayoutOptionsDialog.h \ - laySelectCellViewForm.h \ - laySelectLineStyleForm.h \ - laySelectStippleForm.h \ - layTechnology.h \ - layTipDialog.h \ - layWidgets.h \ - rdbInfoWidget.h \ - rdbMarkerBrowser.h \ - rdbMarkerBrowserDialog.h \ - rdbMarkerBrowserPage.h \ + layuiForceLink.h \ + layBackgroundAwareTreeStyle.h \ + layBookmarkManagementForm.h \ + layBookmarksView.h \ + layBrowseInstancesForm.h \ + layBrowseShapesForm.h \ + layBrowser.h \ + layBrowserDialog.h \ + layBrowserPanel.h \ + layBusy.h \ + layCellSelectionForm.h \ + layCellTreeModel.h \ + layConfigurationDialog.h \ + layDialogs.h \ + layEditLineStyleWidget.h \ + layEditLineStylesForm.h \ + layEditStippleWidget.h \ + layEditStipplesForm.h \ + layEditorOptionsFrame.h \ + layEditorOptionsPage.h \ + layEditorOptionsPages.h \ + layFileDialog.h \ + layGenericSyntaxHighlighter.h \ + layHierarchyControlPanel.h \ + layIndexedNetlistModel.h \ + layItemDelegates.h \ + layLayerControlPanel.h \ + layLayerMappingWidget.h \ + layLayerToolbox.h \ + layLayerTreeModel.h \ + layLayoutPropertiesForm.h \ + layLayoutStatisticsForm.h \ + layLayoutViewConfigPages.h \ + layLayoutViewFunctions.h \ + layLibrariesView.h \ + layLoadLayoutOptionsDialog.h \ + layNetExportDialog.h \ + layNetInfoDialog.h \ + layNetlistBrowser.h \ + layNetlistBrowserDialog.h \ + layNetlistBrowserModel.h \ + layNetlistBrowserPage.h \ + layNetlistBrowserTreeModel.h \ + layNetlistCrossReferenceModel.h \ + layQtTools.h \ + laySaveLayoutOptionsDialog.h \ + laySelectCellViewForm.h \ + laySelectLineStyleForm.h \ + laySelectStippleForm.h \ + layTechnology.h \ + layTipDialog.h \ + layWidgets.h \ + rdbInfoWidget.h \ + rdbMarkerBrowser.h \ + rdbMarkerBrowserDialog.h \ + rdbMarkerBrowserPage.h \ INCLUDEPATH += $$LAYBASIC_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC DEPENDPATH += $$LAYBASIC_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC diff --git a/src/layui/layui/layuiForceLink.cc b/src/layui/layui/layuiForceLink.cc new file mode 100644 index 000000000..488f478f9 --- /dev/null +++ b/src/layui/layui/layuiForceLink.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 "layuiForceLink.h" + +namespace layui +{ + int _force_link_f () + { + return 0; + } +} + diff --git a/src/layui/layui/layuiForceLink.h b/src/layui/layui/layuiForceLink.h new file mode 100644 index 000000000..86ed0eb11 --- /dev/null +++ b/src/layui/layui/layuiForceLink.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_layuiForceLink +#define HDR_layuiForceLink + +#include "layuiCommon.h" + +/** + * @file Include this function to force linking of the layui module + */ + +namespace layui +{ + LAYUI_PUBLIC int _force_link_f (); + static int _force_link_target = _force_link_f (); +} + +#endif + diff --git a/src/layview/layview/layview.pro b/src/layview/layview/layview.pro index ed2df8454..30d92982f 100644 --- a/src/layview/layview/layview.pro +++ b/src/layview/layview/layview.pro @@ -10,10 +10,12 @@ RESOURCES = \ SOURCES = \ layGridNet.cc \ + layviewForceLink.cc \ HEADERS = \ layGridNet.h \ layLayoutView.h \ + layviewForceLink.h \ !equals(HAVE_QT, "0") { diff --git a/src/layview/layview/layviewForceLink.cc b/src/layview/layview/layviewForceLink.cc new file mode 100644 index 000000000..400307cba --- /dev/null +++ b/src/layview/layview/layviewForceLink.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 "layviewForceLink.h" + +namespace layview +{ + int _force_link_f () + { + return 0; + } +} + diff --git a/src/layview/layview/layviewForceLink.h b/src/layview/layview/layviewForceLink.h new file mode 100644 index 000000000..f7cdf749d --- /dev/null +++ b/src/layview/layview/layviewForceLink.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_layviewForceLink +#define HDR_layviewForceLink + +#include "layviewCommon.h" + +/** + * @file Include this function to force linking of the layview module + */ + +namespace layview +{ + LAYVIEW_PUBLIC int _force_link_f (); + static int _force_link_target = _force_link_f (); +} + +#endif + diff --git a/src/pymod/lay/layMain.cc b/src/pymod/lay/layMain.cc index 0547098ca..f952ea9bb 100644 --- a/src/pymod/lay/layMain.cc +++ b/src/pymod/lay/layMain.cc @@ -22,14 +22,8 @@ #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 +// to force linking of the layview module +# include "../../layview/layview/layviewForceLink.h" // Force-include other dependencies // NOTE: these libraries contribute to the "lay" module space. Hence we have to include them.