* anapath/anapath.pro,
* anapath/src/main.cc,
* anapath/src/mln_data.hh,
* anapath/src/mln_widgets.cc,
* shared/include/io/magick.hh: Make these files compile with
MLN_WO_GLOBAL_VARS set.
---
igr/ChangeLog | 11 +++++++++++
igr/anapath/anapath.pro | 28 ++++++++++++++++++++++++----
igr/anapath/src/main.cc | 4 +++-
igr/anapath/src/mln_data.hh | 6 +-----
igr/anapath/src/mln_widgets.cc | 13 -------------
igr/shared/include/io/magick.hh | 3 +++
6 files changed, 42 insertions(+), 23 deletions(-)
delete mode 100644 igr/anapath/src/mln_widgets.cc
diff --git a/igr/ChangeLog b/igr/ChangeLog
index 5ea4590..9298ac3 100644
--- a/igr/ChangeLog
+++ b/igr/ChangeLog
@@ -1,5 +1,16 @@
2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Update build system to use MLN_WO_GLOBAL_VARS.
+
+ * anapath/anapath.pro,
+ * anapath/src/main.cc,
+ * anapath/src/mln_data.hh,
+ * anapath/src/mln_widgets.cc,
+ * shared/include/io/magick.hh: Make these files compile with
+ MLN_WO_GLOBAL_VARS set.
+
+2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Move IGR code from milena/sandbox to igr's private module.
* milena/sandbox/lazzara/igr/gui/anapath/anapath.pro,
diff --git a/igr/anapath/anapath.pro b/igr/anapath/anapath.pro
index 19afbd4..a946d99 100644
--- a/igr/anapath/anapath.pro
+++ b/igr/anapath/anapath.pro
@@ -9,13 +9,33 @@ INCLUDEPATH += . src $(PWD)/.. $(PWD)/../shared $(OLN)/milena
LIBS += `Magick++-config --ldflags --libs`
-DEFINES = NDEBUG
+DEFINES = NDEBUG MLN_WO_GLOBAL_VARS
CONFIG += release
# Input
-HEADERS += src/main_window.hh ../shared/src/image_viewer.hh
../shared/src/internal/interactive_scene.hh src/tools/filter.hh src/tools/save.hh
src/mln_data.hh src/tools/load.hh
-FORMS += ui/main_window.ui ../shared/ui/image_viewer.ui
-SOURCES += src/mln_widgets.cc ../shared/src/internal/interactive_scene.cc src/main.cc
+HEADERS += \
+ src/main_window.hh \
+ ../shared/src/image_viewer.hh \
+ ../shared/src/internal/interactive_scene.hh \
+ src/tools/filter.hh \
+ src/tools/save.hh \
+ src/mln_data.hh \
+ src/tools/load.hh
+
+FORMS += \
+ ui/main_window.ui \
+ ../shared/ui/image_viewer.ui
+
+SOURCES += \
+ ../shared/src/internal/interactive_scene.cc \
+ ../shared/src/image_viewer.cc \
+ src/main.cc \
+ src/main_window.cc \
+ src/tools/filter.cc \
+ src/tools/save.cc \
+ src/tools/load.cc \
+ src/mln_data.cc
+
RESOURCES = ../shared/shared.qrc
diff --git a/igr/anapath/src/main.cc b/igr/anapath/src/main.cc
index c17610c..5194c43 100644
--- a/igr/anapath/src/main.cc
+++ b/igr/anapath/src/main.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -26,6 +27,7 @@
#include <QApplication>
#include <QtGui>
+#undef MLN_WO_GLOBAL_VARS
#include <src/main_window.hh>
int main(int argc, char *argv[])
diff --git a/igr/anapath/src/mln_data.hh b/igr/anapath/src/mln_data.hh
index d4dadcb..e8befcf 100644
--- a/igr/anapath/src/mln_data.hh
+++ b/igr/anapath/src/mln_data.hh
@@ -1,10 +1,6 @@
#ifndef IGR_ANAPATH_SRC_MLN_DATA_HH
# define IGR_ANAPATH_SRC_MLN_DATA_HH
-# ifndef INCLUDE_MLN_FILES
-# define MLN_INCLUDE_ONLY
-# endif
-
# include <mln/core/image/image2d.hh>
# include <mln/value/rgb8.hh>
@@ -19,7 +15,7 @@ namespace igr
struct mln_data
{
- typedef io::magick::large_image<mln::value::rgb8> large_image_t;
+ typedef io::magick::large_image<mln::value::rgb8> large_image_t;
mln_data();
~mln_data();
diff --git a/igr/anapath/src/mln_widgets.cc b/igr/anapath/src/mln_widgets.cc
deleted file mode 100644
index c9e62e1..0000000
--- a/igr/anapath/src/mln_widgets.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-#define INCLUDE_MLN_FILES
-
-// Widgets
-#include <src/main_window.cc>
-#include <shared/src/image_viewer.cc>
-
-// Tools
-#include <src/tools/filter.cc>
-#include <src/tools/save.cc>
-#include <src/tools/load.cc>
-
-#include <src/mln_data.cc>
-
diff --git a/igr/shared/include/io/magick.hh b/igr/shared/include/io/magick.hh
index 9de64df..aac73e6 100644
--- a/igr/shared/include/io/magick.hh
+++ b/igr/shared/include/io/magick.hh
@@ -105,6 +105,7 @@ namespace igr
};
+ inline
std::ostream& operator<<(std::ostream& ostr, const info& i)
{
if (i.magic != "")
@@ -118,6 +119,7 @@ namespace igr
// end of io::magick::info
+ inline
info
read_info(const std::string& filename, bool quiet = true)
{
@@ -231,6 +233,7 @@ namespace igr
// analyze_tiles
+ inline
void
analyze_tiles(const std::string& prefix,
const std::string& suffix)
--
1.5.6.5