mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0026739: Problem with generate Qt samples
Generation of project files was fixed.
This commit is contained in:
parent
7aa74f3028
commit
980d161f03
@ -30,7 +30,6 @@
|
||||
#include <GL/glx.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xmu/StdCmap.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <Xw_Window.hxx>
|
||||
#include <QColormap>
|
||||
|
@ -3,7 +3,7 @@ CONFIG += debug_and_release qt
|
||||
|
||||
TARGET = IESample
|
||||
|
||||
SAMPLESROOT = $$(SAMPLESROOT)
|
||||
SAMPLESROOT = $$quote($$(CASROOT)/samples/qt)
|
||||
|
||||
HEADERS = $${SAMPLESROOT}/Common/src/*.h \
|
||||
$${SAMPLESROOT}/Interface/src/*.h
|
||||
@ -22,6 +22,7 @@ RES_DIR = $$quote($$(RES_DIR))
|
||||
|
||||
INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
|
||||
INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
|
||||
INCLUDEPATH += $$quote($$(CASROOT)/inc)
|
||||
|
||||
OCCT_DEFINES = $$(CSF_DEFINES)
|
||||
|
||||
@ -29,21 +30,18 @@ DEFINES = $$split(OCCT_DEFINES, ;)
|
||||
|
||||
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 = ./$$UNAME/bind
|
||||
OBJECTS_DIR = ./$$UNAME/objd
|
||||
MOC_DIR = ./$$UNAME/mocd
|
||||
DESTDIR = ./$$UNAME/bind
|
||||
OBJECTS_DIR = ./$$UNAME/objd
|
||||
MOC_DIR = ./$$UNAME/mocd
|
||||
} else {
|
||||
DESTDIR = ./$$UNAME/bin
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/moc
|
||||
DESTDIR = ./$$UNAME/bin
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/moc
|
||||
}
|
||||
|
||||
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
|
||||
LIBS += -lfreeimageplus
|
||||
LIBS += -ltbb -ltbbmalloc
|
||||
QMAKE_CXXFLAGS += -std=gnu++11
|
||||
}
|
||||
|
||||
win32 {
|
||||
INCLUDES = $$(CSF_OPT_INC)
|
||||
PATHS = $$split(INCLUDES,";")
|
||||
for(path, PATHS):INCLUDEPATH += $${path}
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
DEFINES += _DEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bind
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
|
||||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
LIBS = -L$(CSF_OPT_LIB32D)
|
||||
} else {
|
||||
LIBS = -L$(CSF_OPT_LIB64D)
|
||||
}
|
||||
DEFINES += _DEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bind
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
|
||||
LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/libd
|
||||
} else {
|
||||
DEFINES += NDEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bin
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
|
||||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
LIBS = -L$(CSF_OPT_LIB32)
|
||||
} else {
|
||||
LIBS = -L$(CSF_OPT_LIB64)
|
||||
}
|
||||
DEFINES += NDEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bin
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
|
||||
LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/lib
|
||||
}
|
||||
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
|
||||
}
|
||||
|
4
samples/qt/IESample/custom.bat
Normal file
4
samples/qt/IESample/custom.bat
Normal file
@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
rem Define QT_DIR variables in order to load OCCT environment
|
||||
|
||||
set "QT_DIR="
|
@ -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.
|
||||
#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=""
|
||||
export QT_DIR=""
|
||||
|
@ -1,6 +1,11 @@
|
||||
@echo off
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
call "%~dp0..\..\..\env.bat" %1 %2 %3
|
||||
|
||||
SET "SAMPLESROOT=%~dp0.."
|
||||
SET "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
SET "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
SET "CSF_IEResourcesDefaults=%RES_DIR%"
|
||||
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
set "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
set "CSF_IEResourcesDefaults=%RES_DIR%"
|
||||
|
||||
set "PATH=%QT_DIR%/bin;%PATH%"
|
||||
|
@ -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
|
||||
echo "Environment variable \"CASROOT\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
if [ -e "custom.sh" ]; then
|
||||
source "custom.sh";
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
if [ -e "${aSamplePath}/../../../env.sh" ]; then
|
||||
source "${aSamplePath}/../../../env.sh";
|
||||
fi
|
||||
|
||||
if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then
|
||||
echo "Environment variable \"WOKHOME\" not defined. Define it in \"custom.sh\" script."
|
||||
if test "${QT_DIR}" == ""; then
|
||||
echo "Environment variable \"QT_DIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -21,7 +19,4 @@ host=`uname -s`
|
||||
export STATION=$host
|
||||
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
||||
source $CASROOT/env.sh
|
||||
export CSF_OPT_INC="${CASROOT}/inc:${WOKHOME}/lib:${CSF_OPT_INC}"
|
||||
export PATH=${QT_DIR}/bin:${PATH}
|
||||
|
@ -1,5 +1,6 @@
|
||||
@echo off
|
||||
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 second argument specifies architecture) (win32 or win64)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
|
@ -1,8 +1,7 @@
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
set "BIN_DIR=win%ARCH%\%VCVER%\bind"
|
||||
|
||||
IF ["%CASDEB%"] == [""] (
|
||||
if ["%CASDEB%"] == [""] (
|
||||
set "BIN_DIR=win%ARCH%\%VCVER%\bin"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
cd $aSamplePath
|
||||
|
||||
|
@ -3,7 +3,7 @@ CONFIG += debug_and_release qt
|
||||
|
||||
TARGET = Tutorial
|
||||
|
||||
SAMPLESROOT = $$(SAMPLESROOT)
|
||||
SAMPLESROOT = $$quote($$(CASROOT)/samples/qt)
|
||||
|
||||
HEADERS = src/*.h \
|
||||
$${SAMPLESROOT}/Common/src/*.h \
|
||||
@ -25,6 +25,7 @@ RES_DIR = $$quote($$(RES_DIR))
|
||||
|
||||
INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
|
||||
INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
|
||||
INCLUDEPATH += $$quote($$(CASROOT)/inc)
|
||||
|
||||
OCCT_DEFINES = $$(CSF_DEFINES)
|
||||
|
||||
@ -32,21 +33,18 @@ DEFINES = $$split(OCCT_DEFINES, ;)
|
||||
|
||||
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 = ./$$UNAME/bind
|
||||
OBJECTS_DIR = ./$$UNAME/objd
|
||||
MOC_DIR = ./$$UNAME/mocd
|
||||
DESTDIR = ./$$UNAME/bind
|
||||
OBJECTS_DIR = ./$$UNAME/objd
|
||||
MOC_DIR = ./$$UNAME/mocd
|
||||
} else {
|
||||
DESTDIR = ./$$UNAME/bin
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/moc
|
||||
DESTDIR = ./$$UNAME/bin
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/moc
|
||||
}
|
||||
|
||||
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
|
||||
LIBS += -lfreeimageplus
|
||||
LIBS += -ltbb -ltbbmalloc
|
||||
QMAKE_CXXFLAGS += -std=gnu++11
|
||||
}
|
||||
|
||||
win32 {
|
||||
INCLUDES = $$(CSF_OPT_INC)
|
||||
PATHS = $$split(INCLUDES,";")
|
||||
for(path, PATHS):INCLUDEPATH += $${path}
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
DEFINES += _DEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bind
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
|
||||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
LIBS = -L$(CSF_OPT_LIB32D)
|
||||
} else {
|
||||
LIBS = -L$(CSF_OPT_LIB64D)
|
||||
}
|
||||
DEFINES += _DEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bind
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
|
||||
LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/libd
|
||||
} else {
|
||||
DEFINES += NDEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bin
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
|
||||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
LIBS = -L$(CSF_OPT_LIB32)
|
||||
} else {
|
||||
LIBS = -L$(CSF_OPT_LIB64)
|
||||
}
|
||||
DEFINES += NDEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bin
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
|
||||
LIBS = -L$$(QT_DIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/lib
|
||||
}
|
||||
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
|
||||
}
|
||||
|
4
samples/qt/Tutorial/custom.bat
Normal file
4
samples/qt/Tutorial/custom.bat
Normal file
@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
rem Define QT_DIR variables in order to load OCCT environment
|
||||
|
||||
set "QT_DIR="
|
@ -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.
|
||||
#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=""
|
||||
export QT_DIR=""
|
||||
|
@ -1,6 +1,11 @@
|
||||
@echo off
|
||||
|
||||
call "custom.bat" %1 %2 %3
|
||||
|
||||
call "%~dp0..\..\..\env.bat" %1 %2 %3
|
||||
|
||||
SET "SAMPLESROOT=%~dp0.."
|
||||
SET "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
SET "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
SET "CSF_TutorialResourcesDefaults=%RES_DIR%"
|
||||
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
set "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
set "CSF_TutorialResourcesDefaults=%RES_DIR%"
|
||||
|
||||
set "PATH=%QT_DIR%/bin;%PATH%"
|
||||
|
@ -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
|
||||
echo "Environment variable \"CASROOT\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
if [ -e "custom.sh" ]; then
|
||||
source "custom.sh";
|
||||
fi
|
||||
|
||||
if test "${QTDIR}" == ""; then
|
||||
echo "Environment variable \"QTDIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
if [ -e "${aSamplePath}/../../../env.sh" ]; then
|
||||
source "${aSamplePath}/../../../env.sh";
|
||||
fi
|
||||
|
||||
if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then
|
||||
echo "Environment variable \"WOKHOME\" not defined. Define it in \"custom.sh\" script."
|
||||
if test "${QT_DIR}" == ""; then
|
||||
echo "Environment variable \"QT_DIR\" not defined. Define it in \"custom.sh\" script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -21,7 +19,4 @@ host=`uname -s`
|
||||
export STATION=$host
|
||||
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||
|
||||
export PATH=${QTDIR}/bin:${PATH}
|
||||
|
||||
source $CASROOT/env.sh
|
||||
export CSF_OPT_INC="${CASROOT}/inc:${WOKHOME}/lib:${CSF_OPT_INC}"
|
||||
export PATH=${QT_DIR}/bin:${PATH}
|
||||
|
@ -1,5 +1,6 @@
|
||||
@echo off
|
||||
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 second argument specifies architecture) (win32 or win64)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
cd $aSamplePath
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user