]> Creatis software - bbtk.git/commitdiff
BUG static dll windows
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 11 Mar 2008 18:46:46 +0000 (18:46 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 11 Mar 2008 18:46:46 +0000 (18:46 +0000)
kernel/cmake/AdditionalBBTKConfig.cmake.in
kernel/cmake/BBTKConfigurePackage.cmake
kernel/cmake/BBTKKernelConfig.cmake
kernel/cmake/CMakeLists.txt
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkBlackBox.h
kernel/src/bbtkSystem.h
kernel/src/bbtkWx.cxx
kernel/src/bbtkWx.h

index d1fd674c974f9dd4b6e2197d6c43e9694e88287b..2e3084ae8f7c708037d40fd499f1d22a006b7bfe 100644 (file)
@@ -9,6 +9,7 @@ SET(BBTK_COMPILE_ERROR_MESSAGES @BBTK_COMPILE_ERROR_MESSAGES@)
 SET(BBTK_SHARE_REL_PATH @BBTK_SHARE_REL_PATH@)
 SET(BBTK_DOC_REL_PATH @BBTK_DOC_REL_PATH@)
 SET(BBTK_BBS_REL_PATH @BBTK_BBS_REL_PATH@)
+SET(BBTK_DATA_REL_PATH @BBTK_DATA_REL_PATH@)
 SET(BBTK_CMAKE_REL_PATH @BBTK_CMAKE_REL_PATH@)
 SET(BBTK_CMAKE_DIR ${BBTK_DIR}/${BBTK_CMAKE_REL_PATH})
 #-----------------------------------------------------------------------------
@@ -22,6 +23,7 @@ IF(FIND_PACKAGE_VERBOSE)
   MESSAGE(STATUS "* BBTK_SHARE_REL_PATH           = ${BBTK_SHARE_REL_PATH}")  
   MESSAGE(STATUS "* BBTK_DOC_REL_PATH             = ${BBTK_DOC_REL_PATH}")  
   MESSAGE(STATUS "* BBTK_BBS_REL_PATH             = ${BBTK_BBS_REL_PATH}")
+  MESSAGE(STATUS "* BBTK_DATA_REL_PATH            = ${BBTK_DATA_REL_PATH}")
   MESSAGE(STATUS "* BBTK_CMAKE_REL_PATH           = ${BBTK_CMAKE_REL_PATH}")
 ENDIF(FIND_PACKAGE_VERBOSE)
 
index 56d31f048b65167b3baed55510aeb846339b8d34..e7ab6b113d2e365a4f2bbfa3488da0544a4b041f 100644 (file)
@@ -103,16 +103,25 @@ IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
       SET(BBTK_USE_WXWIDGETS ON CACHE BOOL "Use wxWidgets" FORCE)
       MESSAGE(STATUS "BBTK_USE_WXWIDGETS forced to ON by the compilation of the package ${BBTK_PACKAGE_NAME}")
       # bbtk already links against wx ...
-      #    SET(${BBTK_PACKAGE_NAME}_LIBS
-      #      ${${BBTK_PACKAGE_NAME}_LIBS}
-      #      ${BBTK_WXWIDGETS_LIBRARIES}
-      #      )
+      IF(WIN32)
+          SET(${BBTK_PACKAGE_NAME}_LIBS
+            ${${BBTK_PACKAGE_NAME}_LIBS}
+            ${BBTK_WXWIDGETS_LIBRARIES}
+            )
+       ENDIF(WIN32)
     ELSE(BBTK_CORE_PACKAGE)
       # If linking against a non-wx bbtk : problem
       IF(NOT BBTK_BUILT_WITH_WX)
        MESSAGE(FATAL_ERROR "The bbtk package ${BBTK_PACKAGE_NAME} needs wxWidgets however the bbtk library which was found on your system was not compiled with wxWidgets : recompile it and rebuild the package.")
       ELSE(NOT BBTK_BUILT_WITH_WX)
        SET(USE_WXWIDGETS ON CACHE BOOL "Use wxWidgets" FORCE)
+# bbtk already links against wx ...
+      IF(WIN32)
+          SET(${BBTK_PACKAGE_NAME}_LIBS
+            ${${BBTK_PACKAGE_NAME}_LIBS}
+            ${BBTK_WXWIDGETS_LIBRARIES}
+            )
+       ENDIF(WIN32)
       ENDIF(NOT BBTK_BUILT_WITH_WX)
     ENDIF(BBTK_CORE_PACKAGE)
   ENDIF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS)
index db3014ef3ac9a867ed1f9f31a3b2c74eec86617e..86476e55f27a6c93630cedf7e6da3f63a8a75d3d 100644 (file)
@@ -63,16 +63,14 @@ ENDIF(WIN32)
 # from build tree root or install tree root
 # (different on win/lin)
 IF(WIN32)
-  SET(BBTK_SHARE_REL_PATH )
+  SET(BBTK_SHARE_REL_PATH " ")
   SET(BBTK_DOC_REL_PATH doc)
   SET(BBTK_BBS_REL_PATH bbs)
-  #  SET(BBTK_RSC_REL_PATH rsc)
   SET(BBTK_DATA_REL_PATH data)
 ELSE(WIN32)
   SET(BBTK_SHARE_REL_PATH share/bbtk)
   SET(BBTK_DOC_REL_PATH share/bbtk/doc)
   SET(BBTK_BBS_REL_PATH share/bbtk/bbs)
-  #  SET(BBTK_RSC_REL_PATH share/bbtk/rsc)
   SET(BBTK_DATA_REL_PATH share/bbtk/data)
 ENDIF(WIN32)   
 #-----------------------------------------------------------------------------
index 2fdf72c68dc6c09308827f89cef79ed50285f3e7..3325774ee0ab53966bcddc4b9a5d3b8cfc23733b 100644 (file)
@@ -13,7 +13,11 @@ FOREACH(file ${BBTK_CMAKE_FILES})
     )
 ENDFOREACH(file ${BBTK_CMAKE_FILES})
 
+ IF(UNIX)
+       SET(PREFIX lib/bbtk/)
+ENDIF(UNIX)
+
 INSTALL(
   FILES ${BBTK_CMAKE_FILES}
-  DESTINATION lib/bbtk/${BBTK_CMAKE_REL_PATH}
+  DESTINATION ${PREFIX}${BBTK_CMAKE_REL_PATH}
   )
index 94610b0645b0cde78dedb497d4466e5d10522ff3..bb409a1be3297c99c44cd5d4cd698b27fe126a16 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/03/07 08:40:14 $
-Version:   $Revision: 1.6 $
+Date:      $Date: 2008/03/11 18:46:47 $
+Version:   $Revision: 1.7 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See doc/license.txt or
@@ -35,6 +35,13 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace bbtk
 {
+
+//EED
+  static bool bbmgSomeBoxExecuting = false;
+  static bool bbmgFreezeExecution = false;
+  static std::set<BlackBox*> bbmgExecutionList;
+
+
   //=========================================================================
   BlackBox::BlackBox(const std::string &name) 
     : bbmName(name), bbmStatus(MODIFIED), 
@@ -1038,11 +1045,39 @@ namespace bbtk
    }
   //=========================================================================
 
+    bool BlackBox::bbGlobalGetSomeBoxExecuting()
+       { 
+               return bbmgSomeBoxExecuting; 
+       }
+
+    void BlackBox::bbGlobalSetSomeBoxExecuting(bool b) 
+       { 
+               bbmgSomeBoxExecuting = b; 
+       }
+
+    void BlackBox::bbGlobalSetFreezeExecution(bool b) 
+       { 
+               bbmgFreezeExecution = b;
+       }
+
+    bool BlackBox::bbGlobalGetFreezeExecution() 
+       { 
+               return bbmgFreezeExecution; 
+       }
+
+    void BlackBox::bbGlobalAddToExecutionList( BlackBox* b )
+       {  
+               bbmgExecutionList.insert(b); 
+       } 
+
+
   //=========================================================================
   // Static members initialization
+/*EED
   bool BlackBox::bbmgSomeBoxExecuting = false;
   bool BlackBox::bbmgFreezeExecution = false;
   std::set<BlackBox*> BlackBox::bbmgExecutionList;
+*/
    //=========================================================================
 
 
index abe50e062a42c5c6a59e45fc63ef5a6ffb3f914f..a9c25666c6679b0ba97d11e9d54c0ea03e3debce 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/20 16:05:38 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/03/11 18:46:47 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -30,6 +30,7 @@
 #ifndef __bbtkBlackBox_h__
 #define __bbtkBlackBox_h__
 
+#include "bbtkSystem.h"
 #include "bbtkBlackBoxDescriptor.h"
 //#include "bbtkConnection.h"
 #include "bbtkBlackBoxInputConnector.h"
@@ -338,25 +339,18 @@ bool reaction = true);
     //@}
   public: 
 
-    static bool bbGlobalGetSomeBoxExecuting() 
-    { return bbmgSomeBoxExecuting; }
-    static void bbGlobalSetSomeBoxExecuting(bool b) 
-    { bbmgSomeBoxExecuting = b; }
+    static bool bbGlobalGetSomeBoxExecuting();
+    static void bbGlobalSetSomeBoxExecuting(bool b);
 
-
-    static void bbGlobalSetFreezeExecution(bool b) { bbmgFreezeExecution = b;}
-    static bool bbGlobalGetFreezeExecution() { return bbmgFreezeExecution; }
+    static void bbGlobalSetFreezeExecution(bool b);
+    static bool bbGlobalGetFreezeExecution();
 
     /// Returns true if the box can "react",
     /// which means execute in response to an input change 
     virtual bool bbCanReact() const;
     
     
-    static void bbGlobalAddToExecutionList( BlackBox* b ) 
-   { 
-     bbmgExecutionList.insert(b);   
-} 
-
+    static void bbGlobalAddToExecutionList( BlackBox* b );
     static void bbGlobalProcessExecutionList();
 
     //==================================================================
@@ -401,12 +395,11 @@ bool reaction = true);
     InputConnectorMapType mInputConnectorMap;
     //==================================================================
 
-    
+/*EED    
     static bool bbmgSomeBoxExecuting;
     static bool bbmgFreezeExecution;
-
-
-   static std::set<BlackBox*> bbmgExecutionList;
+    static std::set<BlackBox*> bbmgExecutionList;
+*/
  };
   // Class BlackBox
 
index a65dd51adfe108eb86ad3729644886e77ef13dce..f59df062dbb904816577ecffd8f131674c4c7f34 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkSystem.h,v $
   Language:  C++
-  Date:      $Date: 2008/01/28 10:49:11 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/03/11 18:46:47 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -98,7 +98,7 @@
 //#include "WWW.h"
   #ifdef BBTK_EXPORT_SYMBOLS
     #define BBTK_EXPORT __declspec( dllexport )
-  #else
+#else
     #define BBTK_EXPORT __declspec( dllimport )
   #endif
   #define BBTK_CDECL __cdecl
index abccb5e630f0d8daf2028f4faff3bd30ba1c17d8..fc42e4788c5af29040172211e5356159f30d6256 100644 (file)
@@ -5,6 +5,13 @@
 
 namespace bbtk
 {
+
+//EED
+  static wxWindow* mgTopWindow = 0;
+  static int mgNbWindowsAlive  = 0;
+  static int mgNbWindowsShown  = 0;
+
+
   void Wx::ResetCursor() 
   {
     if (!GetTopWindow()) return;
@@ -61,14 +68,50 @@ namespace bbtk
   //=========================================================================
 
   //=========================================================================
+/*EED
   // Static members 
   wxWindow* Wx::mgTopWindow = 0;
   int Wx::mgNbWindowsAlive  = 0;
   int Wx::mgNbWindowsShown  = 0;
+*/
   //=========================================================================
 
 
+//EED
+    wxWindow* Wx::GetTopWindow() 
+       { 
+               return mgTopWindow; 
+       }
+
+    void Wx::IncNbWindowsAlive() 
+       { 
+               mgNbWindowsAlive++; 
+       }
+
+    int  Wx::GetNbWindowsAlive() 
+       { 
+               return mgNbWindowsAlive; 
+       }
+
+    bool Wx::IsSomeWindowAlive() 
+       { 
+               return (mgNbWindowsAlive>0);
+       }
+
+    void Wx::IncNbWindowsShown() 
+       { 
+               mgNbWindowsShown++; 
+       }
+
+    int  Wx::GetNbWindowsShown() 
+       { 
+               return mgNbWindowsShown; 
+       }
 
+    bool Wx::IsSomeWindowShown() 
+       { 
+               return (mgNbWindowsShown>0);
+       }
 
 }
 
index a27aae1e88a87b5f3439313b68db913facb5d193..7d64a023a94f22119dd08b7ad41ba1dac1bdeacf 100644 (file)
@@ -45,29 +45,31 @@ namespace bbtk
     static int mBeginBusyCallsCount;
 
     /// Returns the global parent of all bbtk windows
-    static wxWindow* GetTopWindow() { return mgTopWindow; }
+    static wxWindow* GetTopWindow();
     /// Sets the global parent of all bbtk windows
     static void SetTopWindow(wxWindow*);
     
-    static void IncNbWindowsAlive() { mgNbWindowsAlive++; }
+    static void IncNbWindowsAlive();
     static void DecNbWindowsAlive();
-    static int  GetNbWindowsAlive() { return mgNbWindowsAlive; }
-    static bool IsSomeWindowAlive() { return (mgNbWindowsAlive>0);}
+    static int  GetNbWindowsAlive();
+    static bool IsSomeWindowAlive();
     
-    static void IncNbWindowsShown() { mgNbWindowsShown++; }
+    static void IncNbWindowsShown();
     static void DecNbWindowsShown();
-    static int  GetNbWindowsShown() { return mgNbWindowsShown; }
-    static bool IsSomeWindowShown() { return (mgNbWindowsShown>0);}
+    static int  GetNbWindowsShown();
+    static bool IsSomeWindowShown();
     
+/*EED
   private:
     static wxWindow* mgTopWindow;
     static int mgNbWindowsAlive;
     static int mgNbWindowsShown;
-
+*/
   }; // struct Wx
   //==================================================================
   
-  
+
+
   //==================================================================
   /// Conversion std::string to wxString 
   inline wxString std2wx(const std::string& s){