From d04f7a059023fc94341ce4764817dd77cd9f062f Mon Sep 17 00:00:00 2001 From: dbv Date: Mon, 14 Jan 2013 19:28:23 +0300 Subject: [PATCH] 0023702: Add option for building OCCT with X11 on Mac OS X Added switcher to WokConfig and option to custom.sh for building OCCT with X11 libs on Mac OS X --- src/WOKTclLib/templates/env.sh | 6 ++++++ src/WOKsite/wok_deps.tcl | 7 +++++++ src/WOKsite/wok_depsgui.tcl | 7 +++++++ 3 files changed, 20 insertions(+) mode change 100644 => 100755 src/WOKTclLib/templates/env.sh diff --git a/src/WOKTclLib/templates/env.sh b/src/WOKTclLib/templates/env.sh old mode 100644 new mode 100755 index e106a8a..4875619 --- a/src/WOKTclLib/templates/env.sh +++ b/src/WOKTclLib/templates/env.sh @@ -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=":" diff --git a/src/WOKsite/wok_deps.tcl b/src/WOKsite/wok_deps.tcl index fdb3033..c82f9c7 100644 --- a/src/WOKsite/wok_deps.tcl +++ b/src/WOKsite/wok_deps.tcl @@ -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" diff --git a/src/WOKsite/wok_depsgui.tcl b/src/WOKsite/wok_depsgui.tcl index 0b74969..59d537c 100644 --- a/src/WOKsite/wok_depsgui.tcl +++ b/src/WOKsite/wok_depsgui.tcl @@ -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 -- 2.39.5