From 7231703f4f913bc82cb34468ec05f0af97a917f3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Wed, 14 Jul 2010 19:39:36 +0000 Subject: [PATCH] * All Tools: - Change: Switch from "goodies" to "bootstrap". --- hurricane/CMakeLists.txt | 11 ++--- hurricane/cmake_modules/FindHURRICANE.cmake | 36 +++++++-------- hurricane/src/isobar/CMakeLists.txt | 6 +-- hurricane/src/isobar/PyHurricane.cpp | 4 -- hurricane/src/isobar/Script.cpp | 2 +- hurricane/src/viewer/CMakeLists.txt | 44 +++++++++---------- .../src/{isobar => viewer}/PyCellViewer.cpp | 2 +- .../hurricane/viewer}/PyCellViewer.h | 12 ++--- 8 files changed, 50 insertions(+), 67 deletions(-) rename hurricane/src/{isobar => viewer}/PyCellViewer.cpp (98%) rename hurricane/src/{isobar/hurricane/isobar => viewer/hurricane/viewer}/PyCellViewer.h (88%) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index 48003cfc..d501fe15 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -4,10 +4,6 @@ OPTION(BUILD_DOC "Build the documentation (doxygen)" OFF) CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0) -#IF(COMMAND CMAKE_POLICY) -# CMAKE_POLICY(SET CMP0003 NEW) -#ENDIF(COMMAND CMAKE_POLICY) - MACRO(SETUP_PROJECT_PATHS project) IF( NOT("$ENV{${project}_TOP}" STREQUAL "") ) MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}") @@ -24,18 +20,17 @@ MACRO(SETUP_PROJECT_PATHS project) LIST(REMOVE_DUPLICATES CMAKE_MODULE_PATH) ENDMACRO(SETUP_PROJECT_PATHS project) -SETUP_PROJECT_PATHS(GOODIES) +SETUP_PROJECT_PATHS(BOOTSTRAP) SETUP_PROJECT_PATHS(VLSISAPD) LIST(INSERT CMAKE_MODULE_PATH 0 "${HURRICANE_SOURCE_DIR}/cmake_modules/") -find_package(Goodies REQUIRED) - +find_package(Bootstrap REQUIRED) +set_cmake_policies() set_lib_link_mode() setup_boost(regex) SET(QT_USE_QTXML "true") - FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project FIND_PACKAGE(BISON REQUIRED) FIND_PACKAGE(FLEX REQUIRED) diff --git a/hurricane/cmake_modules/FindHURRICANE.cmake b/hurricane/cmake_modules/FindHURRICANE.cmake index 63f72633..38f4cef6 100644 --- a/hurricane/cmake_modules/FindHURRICANE.cmake +++ b/hurricane/cmake_modules/FindHURRICANE.cmake @@ -33,22 +33,6 @@ IF(UNIX) DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" ) - FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH - NAMES hurricane/viewer/CellWidget.h - PATHS ${CORIOLIS_DIR_SEARCH} - PATH_SUFFIXES include/coriolis2 include - # Help the user find it if we cannot. - DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" - ) - - FIND_LIBRARY(HURRICANE_VIEWER_LIBRARY_PATH - NAMES viewer - PATHS ${CORIOLIS_DIR_SEARCH} - PATH_SUFFIXES lib${LIB_SUFFIX} - # Help the user find it if we cannot. - DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" - ) - FIND_PATH(HURRICANE_PYTHON_INCLUDE_PATH NAMES hurricane/isobar/PyCell.h PATHS ${CORIOLIS_DIR_SEARCH} @@ -65,9 +49,25 @@ IF(UNIX) DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" ) - SET_LIBRARIES_PATH(HURRICANE HURRICANE) - SET_LIBRARIES_PATH(HURRICANE_GRAPHICAL HURRICANE_VIEWER) + FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH + NAMES hurricane/viewer/CellWidget.h + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES include/coriolis2 include + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + + FIND_LIBRARY(HURRICANE_VIEWER_LIBRARY_PATH + NAMES viewer + PATHS ${CORIOLIS_DIR_SEARCH} + PATH_SUFFIXES lib${LIB_SUFFIX} + # Help the user find it if we cannot. + DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}" + ) + + SET_LIBRARIES_PATH(HURRICANE HURRICANE) SET_LIBRARIES_PATH(HURRICANE_PYTHON HURRICANE_PYTHON) + SET_LIBRARIES_PATH(HURRICANE_GRAPHICAL HURRICANE_VIEWER) HURRICANE_CHECK_LIBRARIES(HURRICANE ) HURRICANE_CHECK_LIBRARIES(HURRICANE_GRAPHICAL ${HURRICANE_FIND_REQUIRED}) diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt index 419b6640..1f34ff1c 100644 --- a/hurricane/src/isobar/CMakeLists.txt +++ b/hurricane/src/isobar/CMakeLists.txt @@ -11,7 +11,6 @@ PyBox.cpp PyCell.cpp PyCellCollection.cpp - PyCellViewer.cpp PyComponent.cpp PyComponentCollection.cpp PyContact.cpp @@ -51,7 +50,6 @@ hurricane/isobar/PyBox.h hurricane/isobar/PyCell.h hurricane/isobar/PyCellCollection.h - hurricane/isobar/PyCellViewer.h hurricane/isobar/PyComponent.h hurricane/isobar/PyComponentCollection.h hurricane/isobar/PyContact.h @@ -89,15 +87,13 @@ # source2 & include2 for module that are *not* Python wrappers but true # Hurricane modules. set ( sources2 Script.cpp ) - set ( includes2 hurricane/isobar/Script.h) + set ( includes2 hurricane/isobar/Script.h ) install ( FILES ${includes} ${includes2} DESTINATION include/coriolis2/hurricane/isobar ) add_library ( isobar ${sources} ${sources2} ) - target_link_libraries ( isobar viewer ) add_library ( Hurricane MODULE ${sources} ) - target_link_libraries ( Hurricane viewer ) set_target_properties ( Hurricane PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1" PREFIX "" diff --git a/hurricane/src/isobar/PyHurricane.cpp b/hurricane/src/isobar/PyHurricane.cpp index f944f7da..bebda556 100644 --- a/hurricane/src/isobar/PyHurricane.cpp +++ b/hurricane/src/isobar/PyHurricane.cpp @@ -64,7 +64,6 @@ #include "hurricane/isobar/PyEntity.h" #include "hurricane/isobar/PyCell.h" #include "hurricane/isobar/PyCellCollection.h" -#include "hurricane/isobar/PyCellViewer.h" #include "hurricane/isobar/PyLayer.h" #include "hurricane/isobar/PyPin.h" #include "hurricane/isobar/PyPinCollection.h" @@ -551,7 +550,6 @@ extern "C" { PyContact_LinkPyType (); PyPin_LinkPyType (); PyPlug_LinkPyType (); - PyCellViewer_LinkPyType (); PyBreakpoint_LinkPyType (); PYTYPE_READY ( UpdateSession ) @@ -584,7 +582,6 @@ extern "C" { PYTYPE_READY ( ReferenceCollection ) PYTYPE_READY ( ReferenceCollectionLocator ) PYTYPE_READY ( HyperNet ) - PYTYPE_READY ( CellViewer ) PYTYPE_READY ( NetExternalComponents ) PYTYPE_READY ( Breakpoint ) @@ -607,7 +604,6 @@ extern "C" { __cs.addType ( "ent" , &PyTypeEntity , "" , false ); __cs.addType ( "cell" , &PyTypeCell , "" , false, "ent" ); __cs.addType ( "cellCol" , &PyTypeCellCollection , "" , false ); - __cs.addType ( "cellView" , &PyTypeCellViewer , "" , false, "view" ); __cs.addType ( "comp" , &PyTypeComponent , "" , false, "ent" ); __cs.addType ( "compCol" , &PyTypeComponentCollection , "" , false ); __cs.addType ( "contact" , &PyTypeContact , "" , false, "comp" ); diff --git a/hurricane/src/isobar/Script.cpp b/hurricane/src/isobar/Script.cpp index c33c07da..5e07d02f 100644 --- a/hurricane/src/isobar/Script.cpp +++ b/hurricane/src/isobar/Script.cpp @@ -41,8 +41,8 @@ #include #include "hurricane/Error.h" #include "hurricane/Cell.h" +#include "hurricane/viewer/PyCellViewer.h" #include "hurricane/isobar/PyCell.h" -#include "hurricane/isobar/PyCellViewer.h" #include "hurricane/isobar/Script.h" diff --git a/hurricane/src/viewer/CMakeLists.txt b/hurricane/src/viewer/CMakeLists.txt index 94cb5fe7..5b47e247 100644 --- a/hurricane/src/viewer/CMakeLists.txt +++ b/hurricane/src/viewer/CMakeLists.txt @@ -36,17 +36,12 @@ hurricane/viewer/ControllerWidget.h hurricane/viewer/ScriptWidget.h ) - set ( exports hurricane/viewer/HApplication.h - hurricane/viewer/ScreenUtilities.h + set ( includes hurricane/viewer/ScreenUtilities.h hurricane/viewer/DisplayStyle.h hurricane/viewer/ColorScale.h hurricane/viewer/Graphics.h - hurricane/viewer/GraphicsWidget.h - hurricane/viewer/ExceptionWidget.h - hurricane/viewer/BreakpointWidget.h - hurricane/viewer/MousePositionWidget.h - hurricane/viewer/GotoWidget.h hurricane/viewer/Selector.h + hurricane/viewer/Ruler.h hurricane/viewer/Command.h hurricane/viewer/AreaCommand.h hurricane/viewer/MoveCommand.h @@ -55,21 +50,9 @@ hurricane/viewer/SelectCommand.h hurricane/viewer/HierarchyCommand.h hurricane/viewer/SelectorCriterion.h - hurricane/viewer/CellWidget.h hurricane/viewer/CellWidgets.h - hurricane/viewer/CellViewer.h - hurricane/viewer/InspectorWidget.h - hurricane/viewer/SelectionPopupModel.h - hurricane/viewer/SelectionPopup.h - hurricane/viewer/SelectionModel.h - hurricane/viewer/SelectionWidget.h - hurricane/viewer/Ruler.h - hurricane/viewer/NetInformations.h - hurricane/viewer/NetlistWidget.h - hurricane/viewer/DisplayFilterWidget.h - hurricane/viewer/ControllerWidget.h - hurricane/viewer/ScriptWidget.h - hurricane/viewer/PaletteWidget.h + ) + set ( pyincludes hurricane/viewer/PyCellViewer.h ) set ( cpps HApplication.cpp ScreenUtilities.cpp @@ -112,12 +95,25 @@ ControllerWidget.cpp ScriptWidget.cpp ) + set ( pycpps PyViewer.cpp + PyCellViewer.cpp + ) qt4_wrap_cpp ( MOC_SRCS ${mocincludes} ) qt4_add_resources ( RCC_SRCS CellViewer.qrc ) - add_library ( viewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} ) + add_library ( viewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} ${pycpps} ) target_link_libraries ( viewer hurricane ${QT_LIBRARIES} ${Boost_LIBRARIES} ) + add_library ( Viewer MODULE ${pycpps} ) + target_link_libraries ( Viewer viewer ) + set_target_properties ( Viewer PROPERTIES + COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1" + PREFIX "" + ) - install ( FILES ${exports} DESTINATION include/coriolis2/hurricane/viewer ) - install ( TARGETS viewer DESTINATION lib${LIB_SUFFIX} ) + + install ( FILES ${includes} + ${mocincludes} + ${pyincludes} DESTINATION include/coriolis2/hurricane/viewer ) + install ( TARGETS viewer DESTINATION lib${LIB_SUFFIX} ) + install ( TARGETS Viewer DESTINATION ${PYTHON_SITE_PACKAGES} ) diff --git a/hurricane/src/isobar/PyCellViewer.cpp b/hurricane/src/viewer/PyCellViewer.cpp similarity index 98% rename from hurricane/src/isobar/PyCellViewer.cpp rename to hurricane/src/viewer/PyCellViewer.cpp index e4309462..fcdb00a1 100644 --- a/hurricane/src/isobar/PyCellViewer.cpp +++ b/hurricane/src/viewer/PyCellViewer.cpp @@ -24,7 +24,7 @@ #include "hurricane/isobar/PyCell.h" -#include "hurricane/isobar/PyCellViewer.h" +#include "hurricane/viewer/PyCellViewer.h" #include "hurricane/viewer/CellWidget.h" diff --git a/hurricane/src/isobar/hurricane/isobar/PyCellViewer.h b/hurricane/src/viewer/hurricane/viewer/PyCellViewer.h similarity index 88% rename from hurricane/src/isobar/hurricane/isobar/PyCellViewer.h rename to hurricane/src/viewer/hurricane/viewer/PyCellViewer.h index 69b505b3..c274ed3e 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyCellViewer.h +++ b/hurricane/src/viewer/hurricane/viewer/PyCellViewer.h @@ -23,14 +23,14 @@ // x-----------------------------------------------------------------x -#ifndef __ISOBAR_CELL_VIEWER__ -#define __ISOBAR_CELL_VIEWER__ +#ifndef __PY_HURRICANE_CELL_VIEWER__ +#define __PY_HURRICANE_CELL_VIEWER__ #include "hurricane/isobar/PyHurricane.h" #include "hurricane/viewer/CellViewer.h" -namespace Isobar { +namespace Hurricane { extern "C" { @@ -55,8 +55,8 @@ extern "C" { #define IsPyCellViewer(v) ( (v)->ob_type == &PyTypeCellViewer ) -#define ISOBARCELLVIEWER(v) ( (PyCellViewer*)(v) ) -#define ISOBARCELLVIEWER_O(v) ( ISOBAR_CELL_VIEWER(v)->_object ) +#define PYCELLVIEWER(v) ( (PyCellViewer*)(v) ) +#define PYCELLVIEWER_O(v) ( ISOBAR_CELL_VIEWER(v)->_object ) } // End of extern "C". @@ -65,4 +65,4 @@ extern "C" { } // End of Isobar namespace. -#endif // __ISOBAR_CELL_VIEWER__ +#endif // __PY_HURRICANE_CELL_VIEWER__