]> Creatis software - crea.git/commitdiff
#3204 crea Feature New Normal branch mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 17 Jul 2018 11:38:05 +0000 (13:38 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 17 Jul 2018 11:38:05 +0000 (13:38 +0200)
appli/creaDevManager/CMakeLists.txt
appli/creaNewProject/creaNewProject.cpp
cmake/CREAMacro_FindAndUseVTK.cmake
cmake/CREAMacro_FindAndUseWxWidgets.cmake
src/creaWx.h

index bec75cdd6466807b6fc894381e5f58cf37892903..f09ae28223ba7d27e037eef5e59ad58f3e75ad1e 100644 (file)
@@ -53,6 +53,8 @@ INCLUDE_DIRECTORIES (
 #-Dependencies---------------------------------------------------------------
 
 # DEPENDENCIES (LIBRARIES TO LINK WITH)
+
+
 SET ( ${EXE_NAME}_LINK_LIBRARIES
     ${crea_LIBRARIES}
     ${WXWIDGETS_LIBRARIES}
index 17f64baeb072bc7f1ea1838da33f1e20f04e6b7b..b7b1bf635c6e696e8deffb57b662aa82dafec4cb 100644 (file)
@@ -80,11 +80,15 @@ bool myApp::OnInit( )
        command2 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\"";
        if ( ! system ( command.c_str() ) )
        {
-               system ( command1.c_str() );
+               system ( command1.c_str() );
                system ( command2.c_str() );
 
         // Create a Package at the same time.   JPR
-               char *author = (char*) (authorWX.mb_str()) ;
+
+               //2018-07-06 mingw64
+//             char *author = (char*) (authorWX.mb_str()) ;
+               char *author = authorWX.mb_str() ;
+               
                std::string nomDirectory = crea::wx2std(dir) + "\\" + crea::wx2std(name);
                std::string nomPackageDirectory = nomDirectory + "\\" + "bbtk_" + crea::wx2std(name) + "_PKG";
                std::string bbCreatePackage("bbCreatePackage ");
index 018187ef941c8f5f9ecb413a4f6b4822011119d9..dd6db4c3e39d81891454f478002b2c8072fe0122 100644 (file)
@@ -135,7 +135,6 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5)
            vtkFiltersSources          
            vtkInfovisLayout         
            vtkIOVideo         
-           vtkRenderingQt
            vtkDICOMParser                  
            vtkFiltersStatistics       
            vtkInteractionImage      
@@ -169,12 +168,9 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5)
            vtkNetCDF          
            vtkViewsContext2D
            vtkFiltersExtraction            
-           vtkGUISupportQt            
            vtkIOExport              
-           vtkNetCDF_cxx      
            vtkViewsCore
            vtkFiltersFlowPaths             
-           vtkGUISupportQtSQL         
            vtkIOGeometry            
            vtkoggtheora       
            vtkViewsGeovis
@@ -187,7 +183,6 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5)
            vtkhdf5_hl                 
            vtkIOImport              
            vtkpng             
-           vtkViewsQt
            vtkFiltersGeometry              
            vtkImagingColor            
            vtkIOInfovis             
@@ -206,7 +201,25 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5)
            vtkRenderingGL2PSOpenGL2
            vtkRenderingContextOpenGL2
 
+#          vtkRenderingQt
+#          vtkGUISupportQt            
+#          vtkGUISupportQtSQL         
+#          vtkViewsQt
+#          vtkNetCDF_cxx      
        )
+       IF (WIN32)
+         SET(VTK_LIBRARIES ${VTK_LIBRARIES} )
+    ELSE(WIN32)
+         SET(VTK_LIBRARIES ${VTK_LIBRARIES} 
+           vtkRenderingQt
+           vtkGUISupportQt            
+           vtkGUISupportQtSQL         
+           vtkViewsQt
+           vtkNetCDF_cxx       
+               )
+       ENDIF(WIN32)
+       
+       
 ENDIF("${VTK_MAJOR_VERSION}" GREATER 5)
 
 
index ec0bdd153af8ecaa16f298dfd45493e6a5db9257..1e7c6ca7ef8ae12122aeca01e919ec6890b209a2 100644 (file)
@@ -49,7 +49,8 @@ MACRO(CREA_FIND_WXWIDGETS)
 #    INCLUDE (${CREA_CMAKE_DIR}/FindWxWidgetsWin32.cmake)
 #    #
   
-       find_package(wxwidgets REQUIRED COMPONENTS core base)
+#      find_package(wxwidgets REQUIRED COMPONENTS base core advanced adv html xml aui)
+       find_package(wxwidgets REQUIRED  )
 
   
   ELSE(WIN32)
@@ -118,9 +119,12 @@ MACRO(CREA_USE_WXWIDGETS)
 #      )
          
        include(${wxWidgets_USE_FILE})
-         
-         
-         
+       
+       SET(WXWIDGETS_LIBRARIES ${wxWidgets_LIBRARIES}   
+                   "${wxWidgets_LIB_DIR}/libwxmsw31u_aui.a"   
+                               "${wxWidgets_LIB_DIR}/libwxmsw31u_webview.a"    
+                               "${wxWidgets_LIB_DIR}/libwxmsw31u_html.a"   
+                               "${wxWidgets_LIB_DIR}/libwxmsw31u_adv.a" )        
   ELSE(WIN32)
 ##    # GTK2
 ##    INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
index c97e10fb0dc35f66f337668c925a447072924ee3..4a5e5f4d0ea3d84e9236c7ee506dae674e543a15 100644 (file)
@@ -66,11 +66,15 @@ typedef void wxWindow;
 //  (cout's to the console are visible) and has a wxWidgets GUI, 
 //  you need to use the linker option "/subsystem:console" and the following code:
 
+//2018-07-06 mingw64                                                           \
+//    return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine() , SW_SHOWNORMAL);                       \
+
 #define CREA_WXMAIN_WITH_CONSOLE                                       \
   int main(int argc, char* argv[])                                     \
   {                                                                    \
-    return WinMain(::GetModuleHandle(NULL), NULL,                      \
-                  ::GetCommandLine(), SW_SHOWNORMAL);                  \
+    char getcommandline2[512];                                                 \
+       wcstombs(getcommandline2 , ::GetCommandLine() , 512);                   \
+    return WinMain(::GetModuleHandle(NULL), NULL, getcommandline2, SW_SHOWNORMAL);                     \
   }                                                                    
 
 #else // defined(_WIN32)