]> Creatis software - bbtk.git/commitdiff
Windows compatibility
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 11 Feb 2009 15:26:58 +0000 (15:26 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 11 Feb 2009 15:26:58 +0000 (15:26 +0000)
samples/SampleInsertWxBlackBoxInOwnFrame/CMakeLists.txt
samples/SampleInterpreter/CMakeLists.txt
samples/SampleInterpreter/bbtkSampleInterpreter.cxx
samples/SampleOutputObserver/CMakeLists.txt
samples/SampleOutputObserver/bbtkSampleOutputObserver.cxx
samples/SampleWidgetsBase/CMakeLists.txt

index 4cd80c903a25cc85b94b161ce7c9dde5c75905c5..3d042fdd0ba93db64a7d67c5fbae69d5a30d0c20 100644 (file)
@@ -11,9 +11,12 @@ IF(bbwx_FOUND)
 INCLUDE(${bbwx_USE_FILE})
 ENDIF(bbwx_FOUND)
 
+SET(USE_WXWIDGETS ON)
+CREA_FIND_AND_USE_LIBRARIES()
+
 SET(SAMPLE bbtkSampleInsertWxBlackBoxInOwnFrame)
 
 # main 
-ADD_EXECUTABLE(${SAMPLE} ${SAMPLE})
+ADD_EXECUTABLE(${SAMPLE} WIN32 ${SAMPLE})
 # Link against bbwx
-TARGET_LINK_LIBRARIES(${SAMPLE} ${bbwx_LIBRARIES})
+TARGET_LINK_LIBRARIES(${SAMPLE} ${bbwx_LIBRARIES} ${BBTK_LIBRARIES} ${WXWIDGETS_LIBRARIES})
index 7b32e376c6860fff06c0fdc66a1aa17a1a350aa0..be4949b554ceb3fc916746f40f2cbeb556c00b97 100644 (file)
@@ -13,6 +13,8 @@ SET(SAMPLE bbtkSampleInterpreter)
 
 # main 
 ADD_EXECUTABLE(${SAMPLE} ${SAMPLE})
+SET_TARGET_PROPERTIES(${SAMPLE} PROPERTIES LINK_FLAGS /subsystem:console )
+
 # Link with bbtk
 TARGET_LINK_LIBRARIES(${SAMPLE} ${BBTK_LIBRARIES})
 
index 6100d5ec6b4148e4345d674d94becde75a43367c..00da1dd9900489f4a2046bbd32c3e44fb4465428 100644 (file)
@@ -10,7 +10,7 @@
 int main(int argv, char* argc[])
 {
   // To track all ...
-  //  bbtk::MessageManager::SetMessageLevel("all",9);
+  //bbtk::MessageManager::SetMessageLevel("all",9);
   
   try
     {
index ca18517ceabdff7eef9fcaeeed50b610b1afe68d..2bcb211f529286c5e75997b19bcb3728b043d101 100644 (file)
@@ -13,7 +13,12 @@ ENDIF(bbwx_FOUND)
 
 SET(SAMPLE bbtkSampleOutputObserver)
 
+SET(USE_WXWIDGETS ON)
+CREA_FIND_AND_USE_LIBRARIES()
+
 # main 
-ADD_EXECUTABLE(${SAMPLE} ${SAMPLE})
+ADD_EXECUTABLE(${SAMPLE} WIN32 ${SAMPLE})
+SET_TARGET_PROPERTIES(${SAMPLE} PROPERTIES LINK_FLAGS /subsystem:console )
+
 # Link against bbwx
-TARGET_LINK_LIBRARIES(${SAMPLE} ${bbwx_LIBRARIES})
+TARGET_LINK_LIBRARIES(${SAMPLE} ${bbwx_LIBRARIES} ${BBTK_LIBRARIES} ${WXWIDGETS_LIBRARIES})
index 71ccbd8975b216473a18b3be332ae95993edfb84..9d32543e69a8fd41b85fbf8c3c3dad0ea8d13d6e 100644 (file)
@@ -12,7 +12,7 @@ void CallbackFunction ( bbtk::BlackBox::Pointer p,  // The black box which chang
                        bbtk::IOStatus s) // The new status of the output
 {
   std::cout << "== Callback function called with p="<<p->bbGetName()
-           <<" o="<<o<<" s="<<bbtk::GetIOStatusString(s)<<std::endl;
+           <<" o="<<o<<" s="<<s/*bbtk::GetIOStatusString(s)*/<<std::endl;
 
   // Cast the black box pointer into Slider pointer
   bbwx::Slider::Pointer slider = boost::dynamic_pointer_cast<bbwx::Slider>(p);
@@ -113,7 +113,7 @@ void ClassWithTwoSliders::OnSlider( bbtk::BlackBox::Pointer p,
                                    bbtk::IOStatus s )
 {
   std::cout << "== 'OnSlider' called with p="<<p->bbGetName()
-           <<" o="<<o<<" s="<<bbtk::GetIOStatusString(s)<<std::endl;
+           <<" o="<<o<<" s="<<s/*bbtk::GetIOStatusString(s)*/<<std::endl;
   
   if ((p==mSlider1) && (o=="Out"))
     {
index 84abf5e4e609d060cf758c0046d31351befdfe58..7aacce57496d20ef6a299f3dd8479eb05ca10c06 100644 (file)
@@ -10,10 +10,14 @@ FIND_PACKAGE(bbwx)
 IF(bbwx_FOUND)
 INCLUDE(${bbwx_USE_FILE})
 ENDIF(bbwx_FOUND)
+SET(USE_WXWIDGETS ON)
+CREA_FIND_AND_USE_LIBRARIES()
 
 SET(SAMPLE bbtkSampleWidgetsBase)
 
 # main 
-ADD_EXECUTABLE(${SAMPLE} ${SAMPLE})
+ADD_EXECUTABLE(${SAMPLE} WIN32 ${SAMPLE})
+SET_TARGET_PROPERTIES(${SAMPLE} PROPERTIES LINK_FLAGS /subsystem:console )
+
 # Link against bbwx
-TARGET_LINK_LIBRARIES(${SAMPLE} ${bbwx_LIBRARIES})
+TARGET_LINK_LIBRARIES(${SAMPLE} ${bbwx_LIBRARIES} ${BBTK_LIBRARIES} ${WXWIDGETS_LIBRARIES})