]> OCCT Git - occt-wok.git/commitdiff
0023702: Add option for building OCCT with X11 on Mac OS X
authordbv <dbv@opencascade.com>
Mon, 14 Jan 2013 16:28:23 +0000 (19:28 +0300)
committerdbv <dbv@opencascade.com>
Thu, 17 Jan 2013 13:31:18 +0000 (17:31 +0400)
Added switcher to WokConfig and option to custom.sh for building OCCT with X11 libs on Mac OS X

src/WOKTclLib/templates/env.sh [changed mode: 0644->0755]
src/WOKsite/wok_deps.tcl
src/WOKsite/wok_depsgui.tcl

old mode 100644 (file)
new mode 100755 (executable)
index e106a8a..4875619
@@ -10,6 +10,7 @@ export CASDEB=""
 export HAVE_TBB="false";
 export HAVE_FREEIMAGE="false";
 export HAVE_GL2PS="false";
+export MACOSX_USE_GLX="false";
 export CSF_OPT_INC=""
 export CSF_OPT_LIB32=""
 export CSF_OPT_LIB64=""
@@ -62,6 +63,11 @@ if [ "$HAVE_GL2PS" == "true" ]; then
   export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GL2PS"
 fi
 
+# Option to compile OCCT with X11 libs on Mac OS X
+if [ "$MACOSX_USE_GLX" == "true" ]; then
+  export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"
+fi
+
 # To split string into array
 aDelimBack=$IFS
 IFS=":"
index fdb3033511c340a76bb89ea00e1b26033482f558..c82f9c71cbea5e019cd5b6af808decceb06c60cc 100644 (file)
@@ -26,6 +26,7 @@ if { "$tcl_platform(platform)" == "unix" } {
 set HAVE_FREEIMAGE "false"
 set HAVE_GL2PS     "false"
 set HAVE_TBB       "false"
+set MACOSX_USE_GLX "false"
 set CHECK_QT4      "true"
 set CHECK_JDK      "true"
 set PRODUCTS_PATH ""
@@ -53,6 +54,9 @@ if { [info exists ::env(HAVE_GL2PS)] } {
 if { [info exists ::env(HAVE_TBB)] } {
   set HAVE_TBB "$::env(HAVE_TBB)"
 }
+if { [info exists ::env(MACOSX_USE_GLX)] } {
+  set MACOSX_USE_GLX "$::env(MACOSX_USE_GLX)"
+}
 if { [info exists ::env(CHECK_QT4)] } {
   set CHECK_QT4 "$::env(CHECK_QT4)"
 }
@@ -808,6 +812,9 @@ proc wokdep:SaveCustom {} {
     puts $aFile "export HAVE_FREEIMAGE=$::HAVE_FREEIMAGE"
     puts $aFile "export HAVE_GL2PS=$::HAVE_GL2PS"
     puts $aFile "export HAVE_TBB=$::HAVE_TBB"
+    if { "$::tcl_platform(os)" == "Darwin" } {
+      puts $aFile "export MACOSX_USE_GLX=$::MACOSX_USE_GLX"
+    }
     puts $aFile "export CHECK_QT4=$::CHECK_QT4"
     puts $aFile "export CHECK_JDK=$::CHECK_JDK"
 
index 0b74969a38a7d649d2dc32a6ed0053e8365ba2d7..59d537c879f18f6dbe4be5e47a88e60b3329105f 100644 (file)
@@ -331,6 +331,8 @@ checkbutton   .myFrame.myGl2psCheck    -offvalue "false" -onvalue "true" -variab
 ttk::label    .myFrame.myGl2psLbl      -text "Use GL2PS"
 checkbutton   .myFrame.myTbbCheck      -offvalue "false" -onvalue "true" -variable HAVE_TBB       -command wokdep:gui:UpdateList
 ttk::label    .myFrame.myTbbLbl        -text "Use Intel TBB"
+checkbutton   .myFrame.myMacGLXCheck   -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
+ttk::label    .myFrame.myMacGLXLbl     -text "Use X11 for windows drawing"
 checkbutton   .myFrame.myQt4Check      -offvalue "false" -onvalue "true" -variable CHECK_QT4      -command wokdep:gui:UpdateList
 ttk::label    .myFrame.myQt4Lbl        -text "Search Qt4"
 checkbutton   .myFrame.myJDKCheck      -offvalue "false" -onvalue "true" -variable CHECK_JDK      -command wokdep:gui:UpdateList
@@ -423,6 +425,11 @@ incr aRowIter
 grid .myFrame.myTbbCheck      -row $aRowIter -column 0 -sticky e
 grid .myFrame.myTbbLbl        -row $aRowIter -column 1 -sticky w
 incr aRowIter
+if { "$::tcl_platform(os)" == "Darwin" } {
+  grid .myFrame.myMacGLXCheck -row $aRowIter -column 0 -sticky e
+  grid .myFrame.myMacGLXLbl   -row $aRowIter -column 1 -sticky w
+  incr aRowIter
+}
 
 # Additional headers search paths
 grid .myFrame.myIncLbl    -row $aRowIter -column 0 -columnspan 10 -sticky w