reorganisation

This commit is contained in:
Christophe Alexandre 2008-01-10 21:20:55 +00:00
parent 7cc672bb96
commit 31f69a55fb
9 changed files with 33 additions and 40 deletions

View File

@ -7,4 +7,4 @@ Name: hurricane
Description: Hurricane Libs
Version: 2.0.b
Libs: -L${libdir} -lanalogic -lhurricaneviewer -lhurricane
Cflags: -I${includedir}/hurricane
Cflags: -I${includedir}/coriolis/hurricane

View File

@ -1,18 +1,4 @@
project(HURRICANE)
cmake_minimum_required(VERSION 2.4.0)
set(CMAKE_MODULE_PATH "${HURRICANE_SOURCE_DIR}/cmake_modules/")
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
add_subdirectory(hurricane)
add_subdirectory(analogic)
add_subdirectory(viewer)
add_subdirectory(editor)
set(DEST_DIR "$ENV{DESTDIR}")
configure_file(${HURRICANE_SOURCE_DIR}/hurricane.pc.cmake hurricane.pc @ONLY)
install(FILES ${HURRICANE_BINARY_DIR}/hurricane.pc DESTINATION /share/pkgconfig)

View File

@ -1,34 +1,36 @@
set(includes RdsUnit.h)
add_custom_target(DTRParser echo "Creating DTRParser")
set(source_dir ${HURRICANE_SOURCE_DIR}/src/analogic)
set(binary_dir ${HURRICANE_BINARY_DIR}/src/analogic)
add_custom_command(
SOURCE ${HURRICANE_SOURCE_DIR}/analogic/ParserDtrScan.ll
SOURCE ${source_dir}/ParserDtrScan.ll
COMMAND ${FLEX_EXECUTABLE}
ARGS -Pdtr -o${HURRICANE_BINARY_DIR}/analogic/ParserDtrScan.cpp
${HURRICANE_SOURCE_DIR}/analogic/ParserDtrScan.ll
ARGS -Pdtr -o${binary_dir}/ParserDtrScan.cpp
${source_dir}/ParserDtrScan.ll
TARGET DTRParser
OUTPUTS ${HURRICANE_BINARY_DIR}/analogic/ParserDtrScan.cpp)
OUTPUTS ${binary_dir}/ParserDtrScan.cpp)
add_custom_command(
SOURCE ${HURRICANE_SOURCE_DIR}/analogic/ParserDtrGram.yy
SOURCE ${source_dir}/ParserDtrGram.yy
COMMAND ${BISON_EXECUTABLE}
ARGS -d -v -p dtr -y ${HURRICANE_SOURCE_DIR}/analogic/ParserDtrGram.yy
-o ${HURRICANE_BINARY_DIR}/analogic/ParserDtrGram.cpp
ARGS -d -v -p dtr -y ${source_dir}/ParserDtrGram.yy
-o ${binary_dir}/ParserDtrGram.cpp
TARGET DSTParser
DEPENDS ${HURRICANE_BINARY_DIR}/analogic/ParserDtrScan.cpp
OUTPUTS ${HURRICANE_BINARY_DIR}/analogic/ParserDtrGram.cpp)
DEPENDS ${binary_dir}/ParserDtrScan.cpp
OUTPUTS ${binary_dir}/ParserDtrGram.cpp)
set(DST_SRCS ${DST_SRCS} ${HURRICANE_BINARY_DIR}/analogic/ParserDtrGram.cpp
${HURRICANE_BINARY_DIR}/analogic/ParserDtrScan.cpp)
set(DST_SRCS ${DST_SRCS} ${binary_dir}/ParserDtrGram.cpp
${binary_dir}/ParserDtrScan.cpp)
SET_SOURCE_FILES_PROPERTIES(${HURRICANE_BINARY_DIR}/analogic/ParserDtrGram.cpp GENERATED)
SET_SOURCE_FILES_PROPERTIES(${HURRICANE_BINARY_DIR}/analogic/ParserDtrScan.cpp GENERATED)
SET_SOURCE_FILES_PROPERTIES(${binary_dir}/ParserDtrGram.cpp GENERATED)
SET_SOURCE_FILES_PROPERTIES(${binary_dir}/ParserDtrScan.cpp GENERATED)
INCLUDE_DIRECTORIES(${HURRICANE_BINARY_DIR}/analogic/
${HURRICANE_SOURCE_DIR}/hurricane
${HURRICANE_SOURCE_DIR}/analogic
INCLUDE_DIRECTORIES(${binary_dir}
${HURRICANE_SOURCE_DIR}/src/hurricane
${source_dir}
)
add_library(analogic SHARED
@ -43,5 +45,5 @@ TwoSpaces.cpp)
target_link_libraries(analogic hurricane)
install(FILES ${includes} DESTINATION /include/hurricane)
install(FILES ${includes} DESTINATION /include/coriolis/hurricane)
install(TARGETS analogic DESTINATION /lib)

View File

@ -1,6 +1,6 @@
include(${QT_USE_FILE})
include_directories(${HURRICANE_SOURCE_DIR}/hurricane)
include_directories(${HURRICANE_SOURCE_DIR}/src/hurricane)
set(includes InstanceFigure.h Utils.h)
set(cpps InstanceFigure.cpp CellScene.cpp)
@ -8,6 +8,5 @@ set(cpps InstanceFigure.cpp CellScene.cpp)
add_library(hurricaneeditor SHARED ${cpps})
target_link_libraries(hurricaneeditor ${QT_LIBRARIES} hurricane)
install(FILES ${includes} DESTINATION /include/hurricane)
install(FILES ${includes} DESTINATION /include/coriolis/hurricane)
install(TARGETS hurricaneeditor DESTINATION /lib)

View File

@ -32,5 +32,5 @@ UserGo.cpp Vertical.cpp Warning.cpp)
add_library(hurricane SHARED ${cpps})
install(FILES ${includes} DESTINATION /include/hurricane)
install(FILES ${includes} DESTINATION /include/coriolis/hurricane)
install(TARGETS hurricane DESTINATION /lib)

View File

@ -1,12 +1,15 @@
include(${QT_USE_FILE})
include_directories(${HURRICANE_SOURCE_DIR}/hurricane)
include_directories(${HURRICANE_SOURCE_DIR}/src/hurricane)
set(includes CellWidget.h)
set(cpps CellWidget.cpp)
add_library(hurricaneviewer SHARED ${cpps})
QT4_WRAP_CPP(MOC_SRCS ${includes})
add_library(hurricaneviewer SHARED ${cpps} ${MOC_SRCS})
target_link_libraries(hurricaneviewer ${QT_LIBRARIES} hurricane)
install(FILES ${includes} DESTINATION /include/hurricane)
install(FILES ${includes} DESTINATION /include/coriolis/hurricane)
install(TARGETS hurricaneviewer DESTINATION /lib)

View File

@ -2,6 +2,7 @@
#define __CELL_WIDGET_H
#include <QWidget>
#include <QPen>
#include "Box.h"
#include "Cell.h"
@ -9,6 +10,8 @@ using namespace H;
class CellWidget : public QWidget {
Q_OBJECT
public:
CellWidget(Cell* cell, QWidget* parent=0);
void redraw();