From 43b1503553c17d85b0e7aa356468fb8527e2bb68 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Wed, 11 Feb 2009 15:26:58 +0000 Subject: [PATCH] Windows compatibility --- samples/SampleInsertWxBlackBoxInOwnFrame/CMakeLists.txt | 7 +++++-- samples/SampleInterpreter/CMakeLists.txt | 2 ++ samples/SampleInterpreter/bbtkSampleInterpreter.cxx | 2 +- samples/SampleOutputObserver/CMakeLists.txt | 9 +++++++-- .../SampleOutputObserver/bbtkSampleOutputObserver.cxx | 4 ++-- samples/SampleWidgetsBase/CMakeLists.txt | 8 ++++++-- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/samples/SampleInsertWxBlackBoxInOwnFrame/CMakeLists.txt b/samples/SampleInsertWxBlackBoxInOwnFrame/CMakeLists.txt index 4cd80c9..3d042fd 100644 --- a/samples/SampleInsertWxBlackBoxInOwnFrame/CMakeLists.txt +++ b/samples/SampleInsertWxBlackBoxInOwnFrame/CMakeLists.txt @@ -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}) diff --git a/samples/SampleInterpreter/CMakeLists.txt b/samples/SampleInterpreter/CMakeLists.txt index 7b32e37..be4949b 100644 --- a/samples/SampleInterpreter/CMakeLists.txt +++ b/samples/SampleInterpreter/CMakeLists.txt @@ -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}) diff --git a/samples/SampleInterpreter/bbtkSampleInterpreter.cxx b/samples/SampleInterpreter/bbtkSampleInterpreter.cxx index 6100d5e..00da1dd 100644 --- a/samples/SampleInterpreter/bbtkSampleInterpreter.cxx +++ b/samples/SampleInterpreter/bbtkSampleInterpreter.cxx @@ -10,7 +10,7 @@ int main(int argv, char* argc[]) { // To track all ... - // bbtk::MessageManager::SetMessageLevel("all",9); + //bbtk::MessageManager::SetMessageLevel("all",9); try { diff --git a/samples/SampleOutputObserver/CMakeLists.txt b/samples/SampleOutputObserver/CMakeLists.txt index ca18517..2bcb211 100644 --- a/samples/SampleOutputObserver/CMakeLists.txt +++ b/samples/SampleOutputObserver/CMakeLists.txt @@ -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}) diff --git a/samples/SampleOutputObserver/bbtkSampleOutputObserver.cxx b/samples/SampleOutputObserver/bbtkSampleOutputObserver.cxx index 71ccbd8..9d32543 100644 --- a/samples/SampleOutputObserver/bbtkSampleOutputObserver.cxx +++ b/samples/SampleOutputObserver/bbtkSampleOutputObserver.cxx @@ -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="<bbGetName() - <<" o="<