1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0026739: Problem with generate Qt samples

Generation of project files was fixed.
This commit is contained in:
ski 2015-10-06 14:14:36 +03:00 committed by bugmaster
parent 7aa74f3028
commit 980d161f03
18 changed files with 99 additions and 127 deletions

View File

@ -30,7 +30,6 @@
#include <GL/glx.h> #include <GL/glx.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/Xmu/StdCmap.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <Xw_Window.hxx> #include <Xw_Window.hxx>
#include <QColormap> #include <QColormap>

View File

@ -3,7 +3,7 @@ CONFIG += debug_and_release qt
TARGET = IESample TARGET = IESample
SAMPLESROOT = $$(SAMPLESROOT) SAMPLESROOT = $$quote($$(CASROOT)/samples/qt)
HEADERS = $${SAMPLESROOT}/Common/src/*.h \ HEADERS = $${SAMPLESROOT}/Common/src/*.h \
$${SAMPLESROOT}/Interface/src/*.h $${SAMPLESROOT}/Interface/src/*.h
@ -22,6 +22,7 @@ RES_DIR = $$quote($$(RES_DIR))
INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src) INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src) INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
INCLUDEPATH += $$quote($$(CASROOT)/inc)
OCCT_DEFINES = $$(CSF_DEFINES) OCCT_DEFINES = $$(CSF_DEFINES)
@ -29,21 +30,18 @@ DEFINES = $$split(OCCT_DEFINES, ;)
unix { unix {
UNAME = $$system(uname -s) UNAME = $$system(uname -s)
INCLUDES = $$(CSF_OPT_INC)
PATHS = $$split(INCLUDES,":")
for(path, PATHS):INCLUDEPATH += $${path}
LIBLIST = $$(LD_LIBRARY_PATH) LIBLIST = $$(LD_LIBRARY_PATH)
LIBPATHS = $$split(LIBLIST,":") LIBPATHS = $$split(LIBLIST,":")
for(lib, LIBPATHS):LIBS += -L$${lib} for(lib, LIBPATHS):LIBS += -L$${lib}
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
DESTDIR = ./$$UNAME/bind DESTDIR = ./$$UNAME/bind
OBJECTS_DIR = ./$$UNAME/objd OBJECTS_DIR = ./$$UNAME/objd
MOC_DIR = ./$$UNAME/mocd MOC_DIR = ./$$UNAME/mocd
} else { } else {
DESTDIR = ./$$UNAME/bin DESTDIR = ./$$UNAME/bin
OBJECTS_DIR = ./$$UNAME/obj OBJECTS_DIR = ./$$UNAME/obj
MOC_DIR = ./$$UNAME/moc MOC_DIR = ./$$UNAME/moc
} }
MACOSX_USE_GLX = $$(MACOSX_USE_GLX) MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
@ -55,33 +53,22 @@ unix {
!macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
LIBS += -lfreeimageplus LIBS += -lfreeimageplus
LIBS += -ltbb -ltbbmalloc LIBS += -ltbb -ltbbmalloc
QMAKE_CXXFLAGS += -std=gnu++11
} }
win32 { win32 {
INCLUDES = $$(CSF_OPT_INC)
PATHS = $$split(INCLUDES,";")
for(path, PATHS):INCLUDEPATH += $${path}
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
DEFINES += _DEBUG DEFINES += _DEBUG
DESTDIR = ./win$(ARCH)/$(VCVER)/bind DESTDIR = ./win$(ARCH)/$(VCVER)/bind
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
!contains(QMAKE_HOST.arch, x86_64) { LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/libd
LIBS = -L$(CSF_OPT_LIB32D)
} else {
LIBS = -L$(CSF_OPT_LIB64D)
}
} else { } else {
DEFINES += NDEBUG DEFINES += NDEBUG
DESTDIR = ./win$(ARCH)/$(VCVER)/bin DESTDIR = ./win$(ARCH)/$(VCVER)/bin
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
MOC_DIR = ./win$(ARCH)/$(VCVER)/moc MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
!contains(QMAKE_HOST.arch, x86_64) { LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/lib
LIBS = -L$(CSF_OPT_LIB32)
} else {
LIBS = -L$(CSF_OPT_LIB64)
}
} }
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
} }

View File

@ -0,0 +1,4 @@
@echo off
rem Define QT_DIR variables in order to load OCCT environment
set "QT_DIR="

View File

@ -1,10 +1,4 @@
#!/bin/sh #!/bin/bash
#Define QT_DIR variables in order to generate Makefile files by qmake
#Define CASROOT and QTDIR variables in order to generate Makefile files by qmake. export QT_DIR=""
#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=""
export WOKHOME=""

View File

@ -1,6 +1,11 @@
@echo off
call "custom.bat" %1 %2 %3
call "%~dp0..\..\..\env.bat" %1 %2 %3 call "%~dp0..\..\..\env.bat" %1 %2 %3
SET "SAMPLESROOT=%~dp0.." set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
SET "RES_DIR=%~dp0win%ARCH%\%VCVER%\res" set "CSF_ResourcesDefaults=%RES_DIR%"
SET "CSF_ResourcesDefaults=%RES_DIR%" set "CSF_IEResourcesDefaults=%RES_DIR%"
SET "CSF_IEResourcesDefaults=%RES_DIR%"
set "PATH=%QT_DIR%/bin;%PATH%"

View File

@ -1,19 +1,17 @@
#!/bin/sh #!/bin/bash
if [ -e "${aSamplePath}/custom.sh" ]; then source "${aSamplePath}/custom.sh"; fi export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if test "${CASROOT}" == ""; then if [ -e "custom.sh" ]; then
echo "Environment variable \"CASROOT\" not defined. Define it in \"custom.sh\" script." source "custom.sh";
exit 1
fi fi
if test "${QTDIR}" == ""; then if [ -e "${aSamplePath}/../../../env.sh" ]; then
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script." source "${aSamplePath}/../../../env.sh";
exit 1
fi fi
if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then if test "${QT_DIR}" == ""; then
echo "Environment variable \"WOKHOME\" not defined. Define it in \"custom.sh\" script." echo "Environment variable \"QT_DIR\" not defined. Define it in \"custom.sh\" script."
exit 1 exit 1
fi fi
@ -21,7 +19,4 @@ host=`uname -s`
export STATION=$host export STATION=$host
export RES_DIR=${aSamplePath}/${STATION}/res export RES_DIR=${aSamplePath}/${STATION}/res
export PATH=${QTDIR}/bin:${PATH} export PATH=${QT_DIR}/bin:${PATH}
source $CASROOT/env.sh
export CSF_OPT_INC="${CASROOT}/inc:${WOKHOME}/lib:${CSF_OPT_INC}"

View File

@ -1,5 +1,6 @@
@echo off
REM Generation of vcproj files with qmake utilite REM Generation of vcproj files with qmake utilite
REM Variable QTDIR and PATH to qmake executable must be defined without fail REM Variable QT_DIR and PATH to qmake executable must be defined without fail
REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10), REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
REM second argument specifies architecture) (win32 or win64) REM second argument specifies architecture) (win32 or win64)

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi

View File

@ -1,8 +1,7 @@
call "%~dp0env.bat" %1 %2 %3 call "%~dp0env.bat" %1 %2 %3
set "BIN_DIR=win%ARCH%\%VCVER%\bind" set "BIN_DIR=win%ARCH%\%VCVER%\bind"
if ["%CASDEB%"] == [""] (
IF ["%CASDEB%"] == [""] (
set "BIN_DIR=win%ARCH%\%VCVER%\bin" set "BIN_DIR=win%ARCH%\%VCVER%\bin"
) )

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/bash
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
cd $aSamplePath cd $aSamplePath

View File

@ -3,7 +3,7 @@ CONFIG += debug_and_release qt
TARGET = Tutorial TARGET = Tutorial
SAMPLESROOT = $$(SAMPLESROOT) SAMPLESROOT = $$quote($$(CASROOT)/samples/qt)
HEADERS = src/*.h \ HEADERS = src/*.h \
$${SAMPLESROOT}/Common/src/*.h \ $${SAMPLESROOT}/Common/src/*.h \
@ -25,6 +25,7 @@ RES_DIR = $$quote($$(RES_DIR))
INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src) INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src) INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
INCLUDEPATH += $$quote($$(CASROOT)/inc)
OCCT_DEFINES = $$(CSF_DEFINES) OCCT_DEFINES = $$(CSF_DEFINES)
@ -32,21 +33,18 @@ DEFINES = $$split(OCCT_DEFINES, ;)
unix { unix {
UNAME = $$system(uname -s) UNAME = $$system(uname -s)
INCLUDES = $$(CSF_OPT_INC)
PATHS = $$split(INCLUDES,":")
for(path, PATHS):INCLUDEPATH += $${path}
LIBLIST = $$(LD_LIBRARY_PATH) LIBLIST = $$(LD_LIBRARY_PATH)
LIBPATHS = $$split(LIBLIST,":") LIBPATHS = $$split(LIBLIST,":")
for(lib, LIBPATHS):LIBS += -L$${lib} for(lib, LIBPATHS):LIBS += -L$${lib}
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
DESTDIR = ./$$UNAME/bind DESTDIR = ./$$UNAME/bind
OBJECTS_DIR = ./$$UNAME/objd OBJECTS_DIR = ./$$UNAME/objd
MOC_DIR = ./$$UNAME/mocd MOC_DIR = ./$$UNAME/mocd
} else { } else {
DESTDIR = ./$$UNAME/bin DESTDIR = ./$$UNAME/bin
OBJECTS_DIR = ./$$UNAME/obj OBJECTS_DIR = ./$$UNAME/obj
MOC_DIR = ./$$UNAME/moc MOC_DIR = ./$$UNAME/moc
} }
MACOSX_USE_GLX = $$(MACOSX_USE_GLX) MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
@ -58,33 +56,22 @@ unix {
!macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
LIBS += -lfreeimageplus LIBS += -lfreeimageplus
LIBS += -ltbb -ltbbmalloc LIBS += -ltbb -ltbbmalloc
QMAKE_CXXFLAGS += -std=gnu++11
} }
win32 { win32 {
INCLUDES = $$(CSF_OPT_INC)
PATHS = $$split(INCLUDES,";")
for(path, PATHS):INCLUDEPATH += $${path}
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
DEFINES += _DEBUG DEFINES += _DEBUG
DESTDIR = ./win$(ARCH)/$(VCVER)/bind DESTDIR = ./win$(ARCH)/$(VCVER)/bind
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
!contains(QMAKE_HOST.arch, x86_64) { LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/libd
LIBS = -L$(CSF_OPT_LIB32D)
} else {
LIBS = -L$(CSF_OPT_LIB64D)
}
} else { } else {
DEFINES += NDEBUG DEFINES += NDEBUG
DESTDIR = ./win$(ARCH)/$(VCVER)/bin DESTDIR = ./win$(ARCH)/$(VCVER)/bin
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
MOC_DIR = ./win$(ARCH)/$(VCVER)/moc MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
!contains(QMAKE_HOST.arch, x86_64) { LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/lib
LIBS = -L$(CSF_OPT_LIB32)
} else {
LIBS = -L$(CSF_OPT_LIB64)
}
} }
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
} }

View File

@ -0,0 +1,4 @@
@echo off
rem Define QT_DIR variables in order to load OCCT environment
set "QT_DIR="

View File

@ -1,10 +1,4 @@
#!/bin/sh #!/bin/bash
#Define QT_DIR variables in order to generate Makefile files by qmake
#Define CASROOT and QTDIR variables in order to generate Makefile files by qmake. export QT_DIR=""
#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=""
export WOKHOME=""

View File

@ -1,6 +1,11 @@
@echo off
call "custom.bat" %1 %2 %3
call "%~dp0..\..\..\env.bat" %1 %2 %3 call "%~dp0..\..\..\env.bat" %1 %2 %3
SET "SAMPLESROOT=%~dp0.." set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
SET "RES_DIR=%~dp0win%ARCH%\%VCVER%\res" set "CSF_ResourcesDefaults=%RES_DIR%"
SET "CSF_ResourcesDefaults=%RES_DIR%" set "CSF_TutorialResourcesDefaults=%RES_DIR%"
SET "CSF_TutorialResourcesDefaults=%RES_DIR%"
set "PATH=%QT_DIR%/bin;%PATH%"

View File

@ -1,19 +1,17 @@
#!/bin/sh #!/bin/bash
if [ -e "${aSamplePath}/custom.sh" ]; then source "${aSamplePath}/custom.sh"; fi export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if test "${CASROOT}" == ""; then if [ -e "custom.sh" ]; then
echo "Environment variable \"CASROOT\" not defined. Define it in \"custom.sh\" script." source "custom.sh";
exit 1
fi fi
if test "${QTDIR}" == ""; then if [ -e "${aSamplePath}/../../../env.sh" ]; then
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script." source "${aSamplePath}/../../../env.sh";
exit 1
fi fi
if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then if test "${QT_DIR}" == ""; then
echo "Environment variable \"WOKHOME\" not defined. Define it in \"custom.sh\" script." echo "Environment variable \"QT_DIR\" not defined. Define it in \"custom.sh\" script."
exit 1 exit 1
fi fi
@ -21,7 +19,4 @@ host=`uname -s`
export STATION=$host export STATION=$host
export RES_DIR=${aSamplePath}/${STATION}/res export RES_DIR=${aSamplePath}/${STATION}/res
export PATH=${QTDIR}/bin:${PATH} export PATH=${QT_DIR}/bin:${PATH}
source $CASROOT/env.sh
export CSF_OPT_INC="${CASROOT}/inc:${WOKHOME}/lib:${CSF_OPT_INC}"

View File

@ -1,5 +1,6 @@
@echo off
REM Generation of vcproj files with qmake utilite REM Generation of vcproj files with qmake utilite
REM Variable QTDIR and PATH to qmake executable must be defined without fail REM Variable QT_DIR and PATH to qmake executable must be defined without fail
REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10), REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
REM second argument specifies architecture) (win32 or win64) REM second argument specifies architecture) (win32 or win64)

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/bash
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
cd $aSamplePath cd $aSamplePath