mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0023448: Fix QT samples for Mac OS X
Fixed QT samples so they can be built on Mac OS X with qt-x11
This commit is contained in:
parent
bd82d4b2e9
commit
90ac61454f
15
samples/qt/IESample/IESample.pro
Normal file → Executable file
15
samples/qt/IESample/IESample.pro
Normal file → Executable file
@ -13,7 +13,8 @@ TS_FILES = ./src/Common-icon.ts \
|
||||
DEFINES = CSFDB
|
||||
|
||||
unix {
|
||||
INCLUDES = $$(CSF_OPT_INC)
|
||||
UNAME = $$system(uname -s)
|
||||
INCLUDES = $$(CSF_OPT_INC)
|
||||
PATHS = $$split(INCLUDES,":")
|
||||
for(path, PATHS):INCLUDEPATH += $${path}
|
||||
LIBLIST = $$(LD_LIBRARY_PATH)
|
||||
@ -21,13 +22,13 @@ unix {
|
||||
for(lib, LIBPATHS):LIBS += -L$${lib}
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTDIR = ./Linux/bind
|
||||
OBJECTS_DIR = ./Linux/objd
|
||||
MOC_DIR = ./Linux/srcd
|
||||
DESTDIR = ./$$UNAME/bind
|
||||
OBJECTS_DIR = ./$$UNAME/objd
|
||||
MOC_DIR = ./$$UNAME/srcd
|
||||
} else {
|
||||
DESTDIR = ./Linux/bin
|
||||
OBJECTS_DIR = ./Linux/obj
|
||||
MOC_DIR = ./Linux/src
|
||||
DESTDIR = ./$$UNAME/bin
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/src
|
||||
}
|
||||
INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
|
||||
DEFINES += LIN LININTEL OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
|
||||
|
15
samples/qt/IESample/custom.sh
Normal file → Executable file
15
samples/qt/IESample/custom.sh
Normal file → Executable file
@ -1,19 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
#Define CASROOT and QTDIR variables in order to generate Makefile files by qmake
|
||||
#Define CASROOT and QTDIR variables in order to generate Makefile files by qmake.
|
||||
#If you are using Mac OS X it is necessary to define WOKHOME as a path to your WOK installation directory.
|
||||
|
||||
export CASROOT=""
|
||||
|
||||
export QTDIR=""
|
||||
|
||||
if test "${CASROOT}" == ""; then
|
||||
echo "Environment variable \"CASROOT\" not defined."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
export WOKHOME=""
|
||||
|
20
samples/qt/IESample/env.sh
Normal file → Executable file
20
samples/qt/IESample/env.sh
Normal file → Executable file
@ -1,5 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -e "${aSamplePath}/custom.sh" ]; then source "${aSamplePath}/custom.sh"; fi
|
||||
|
||||
if test "${CASROOT}" == ""; then
|
||||
echo "Environment variable \"CASROOT\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then
|
||||
echo "Environment variable \"WOKHOME\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
||||
source $CASROOT/env.sh
|
||||
export CSF_OPT_INC="${CSF_OPT_INC}${CASROOT}/inc:"
|
||||
export CSF_OPT_INC="${CASROOT}/inc:${WOKHOME}/lib:${CSF_OPT_INC}"
|
||||
|
@ -15,21 +15,22 @@ TS_FILES = ./src/Common-icon.ts \
|
||||
DEFINES = CSFDB
|
||||
|
||||
unix {
|
||||
UNAME = $$system(uname -s)
|
||||
INCLUDES = $$(CSF_OPT_INC)
|
||||
PATHS = $$split(INCLUDES,":")
|
||||
for(path, PATHS):INCLUDEPATH += $${path}
|
||||
LIBLIST = $$(LD_LIBRARY_PATH)
|
||||
LIBPATHS = $$split(LIBLIST,":")
|
||||
for(lib, LIBPATHS):LIBS += -L$${lib}
|
||||
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTDIR = ./Linux/bind
|
||||
OBJECTS_DIR = ./Linux/objd
|
||||
MOC_DIR = ./Linux/srcd
|
||||
DESTDIR = ./$$UNAME/bind
|
||||
OBJECTS_DIR = ./$$UNAME/objd
|
||||
MOC_DIR = ./$$UNAME/srcd
|
||||
} else {
|
||||
DESTDIR = ./Linux/bin
|
||||
OBJECTS_DIR = ./Linux/obj
|
||||
MOC_DIR = ./Linux/src
|
||||
DESTDIR = ./$$UNAME/bin
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/src
|
||||
}
|
||||
INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
|
||||
DEFINES += LIN LININTEL OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H
|
||||
|
15
samples/qt/Tutorial/custom.sh
Normal file → Executable file
15
samples/qt/Tutorial/custom.sh
Normal file → Executable file
@ -1,19 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
#Define CASROOT and QTDIR variables in order to generate Makefile files by qmake
|
||||
#Define CASROOT and QTDIR variables in order to generate Makefile files by qmake.
|
||||
#If you are using Mac OS X it is necessary to define WOKHOME as a path to your WOK installation directory.
|
||||
|
||||
export CASROOT=""
|
||||
|
||||
export QTDIR=""
|
||||
|
||||
if test "${CASROOT}" == ""; then
|
||||
echo "Environment variable \"CASROOT\" not defined."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
export WOKHOME=""
|
||||
|
20
samples/qt/Tutorial/env.sh
Normal file → Executable file
20
samples/qt/Tutorial/env.sh
Normal file → Executable file
@ -1,5 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -e "${aSamplePath}/custom.sh" ]; then source "${aSamplePath}/custom.sh"; fi
|
||||
|
||||
if test "${CASROOT}" == ""; then
|
||||
echo "Environment variable \"CASROOT\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then
|
||||
echo "Environment variable \"WOKHOME\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
||||
source $CASROOT/env.sh
|
||||
export CSF_OPT_INC="${CSF_OPT_INC}${CASROOT}/inc:"
|
||||
export CSF_OPT_INC="${CASROOT}/inc:${WOKHOME}/lib:${CSF_OPT_INC}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user