mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0023821: Improve qmake project files for Qt samples
Project file extension corrected for VS 2010/2012 solutions Sources and resource files from Common and Interface sub-foldrs added to qmake project files from their original location. RES_DIR environment variable redirected to the binary directory, all resource files copied there to keep the source tree intact. RES_DIR environment variable corrected under Linux/MacOS similalry to Windows. Makefile generation corrected under MacOS: - filenames used as the output for the extra compilers instead of the absolute paths. - mkdir and cp command options corrected
This commit is contained in:
parent
b7ad3a6187
commit
fad8962a72
@ -1,6 +1,6 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcxproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2012
|
# Visual Studio 2012
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcxproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
|
# Visual Studio 2003
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IESample", "IESample.vcproj", "{7FD0453F-8AC0-3EE3-9C11-DD413EF20A44}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
@ -1,14 +1,29 @@
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
CONFIG += debug_and_release qt
|
CONFIG += debug_and_release qt
|
||||||
|
QT += qt3support
|
||||||
|
|
||||||
TARGET = IESample
|
TARGET = IESample
|
||||||
|
|
||||||
HEADERS = src/*.h
|
SAMPLESROOT = $$(CASROOT)/samples/qt
|
||||||
SOURCES = src/*.cxx
|
|
||||||
|
|
||||||
TS_FILES = ./src/Common-icon.ts \
|
HEADERS = src/*.h \
|
||||||
./src/Common-string.ts \
|
$${SAMPLESROOT}/Common/src/*.h \
|
||||||
./src/Interface-string.ts
|
$${SAMPLESROOT}/Interface/src/*.h
|
||||||
|
|
||||||
|
SOURCES = src/*.cxx \
|
||||||
|
$${SAMPLESROOT}/Common/src/*.cxx \
|
||||||
|
$${SAMPLESROOT}/Interface/src/*.cxx
|
||||||
|
|
||||||
|
TS_FILES = $${SAMPLESROOT}/Common/src/Common-icon.ts \
|
||||||
|
$${SAMPLESROOT}/Common/src/Common-string.ts \
|
||||||
|
$${SAMPLESROOT}/Interface/src/Interface-string.ts
|
||||||
|
|
||||||
|
RES_FILES = $${SAMPLESROOT}/Common/res/*
|
||||||
|
|
||||||
|
RES_DIR = $$quote($$(RES_DIR))
|
||||||
|
|
||||||
|
INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
|
||||||
|
INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
|
||||||
|
|
||||||
DEFINES = CSFDB
|
DEFINES = CSFDB
|
||||||
|
|
||||||
@ -155,16 +170,33 @@ win32 {
|
|||||||
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
|
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
|
||||||
}
|
}
|
||||||
|
|
||||||
LIBS += -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d -lTKV2d \
|
LIBS += -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d \
|
||||||
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
|
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
|
||||||
-lTKSTEPBase -lTKShapeSchema -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
-lTKSTEPBase -lTKShapeSchema -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
||||||
-lTKXSBase -lTKPShape -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
-lTKXSBase -lTKPShape -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
||||||
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset \
|
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset \
|
||||||
|
|
||||||
|
!exists($${RES_DIR}) {
|
||||||
|
win32 {
|
||||||
|
system(mkdir $${RES_DIR})
|
||||||
|
} else {
|
||||||
|
system(mkdir -p $${RES_DIR})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lrelease.name = LRELEASE ${QMAKE_FILE_IN}
|
lrelease.name = LRELEASE ${QMAKE_FILE_IN}
|
||||||
lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm ./res/${QMAKE_FILE_BASE}.qm
|
lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm $${RES_DIR}/${QMAKE_FILE_BASE}.qm
|
||||||
lrelease.output = ./res/${QMAKE_FILE_BASE}.qm
|
lrelease.output = ${QMAKE_FILE_BASE}.qm
|
||||||
lrelease.input = TS_FILES
|
lrelease.input = TS_FILES
|
||||||
lrelease.clean = ./res/${QMAKE_FILE_BASE}.qm
|
lrelease.clean = $${RES_DIR}/${QMAKE_FILE_BASE}.qm
|
||||||
lrelease.CONFIG += no_link target_predeps
|
lrelease.CONFIG += no_link target_predeps
|
||||||
QMAKE_EXTRA_COMPILERS += lrelease
|
QMAKE_EXTRA_COMPILERS += lrelease
|
||||||
|
|
||||||
|
copy_res.name = Copy resource ${QMAKE_FILE_IN}
|
||||||
|
copy_res.output = ${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
|
||||||
|
copy_res.clean = $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
|
||||||
|
copy_res.input = RES_FILES
|
||||||
|
copy_res.CONFIG += no_link target_predeps
|
||||||
|
win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
|
||||||
|
unix: copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
|
||||||
|
QMAKE_EXTRA_COMPILERS += copy_res
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
SET RES_DIR=%~dp0res
|
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%"
|
||||||
|
@ -17,6 +17,10 @@ if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
host=`uname -s`
|
||||||
|
export STATION=$host
|
||||||
|
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||||
|
|
||||||
export PATH=${QTDIR}/bin:${PATH}
|
export PATH=${QTDIR}/bin:${PATH}
|
||||||
|
|
||||||
source $CASROOT/env.sh
|
source $CASROOT/env.sh
|
||||||
|
@ -6,6 +6,7 @@ REM second argument specifies architecture) (win32 or win64)
|
|||||||
REM third argument specifies Debug or Release mode
|
REM third argument specifies Debug or Release mode
|
||||||
|
|
||||||
call .\..\..\..\env.bat %1 %2 %3
|
call .\..\..\..\env.bat %1 %2 %3
|
||||||
|
call %~dp0env.bat
|
||||||
|
|
||||||
if not "%1" == "" (
|
if not "%1" == "" (
|
||||||
if /I "%1" == "vc8" (
|
if /I "%1" == "vc8" (
|
||||||
|
@ -4,11 +4,6 @@ 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
|
||||||
|
|
||||||
host=`uname -s`
|
|
||||||
STATION=$host
|
|
||||||
|
|
||||||
RES_DIR="${aSamplePath}/res"
|
|
||||||
|
|
||||||
aSystem=`uname -s`
|
aSystem=`uname -s`
|
||||||
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
||||||
if [ "${CASDEB}" == "d" ]; then
|
if [ "${CASDEB}" == "d" ]; then
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcxproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2012
|
# Visual Studio 2012
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcxproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
|
# Visual Studio 2003
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
@ -1,17 +1,32 @@
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
CONFIG += debug_and_release qt
|
CONFIG += debug_and_release qt
|
||||||
|
QT += qt3support
|
||||||
|
|
||||||
TARGET = Tutorial
|
TARGET = Tutorial
|
||||||
|
|
||||||
HEADERS = src/*.h
|
SAMPLESROOT = $$(CASROOT)/samples/qt
|
||||||
SOURCES = src/*.cxx
|
|
||||||
|
|
||||||
|
HEADERS = src/*.h \
|
||||||
|
$${SAMPLESROOT}/Common/src/*.h \
|
||||||
|
$${SAMPLESROOT}/Interface/src/*.h
|
||||||
|
|
||||||
TS_FILES = ./src/Common-icon.ts \
|
SOURCES = src/*.cxx \
|
||||||
./src/Common-string.ts \
|
$${SAMPLESROOT}/Common/src/*.cxx \
|
||||||
|
$${SAMPLESROOT}/Interface/src/*.cxx
|
||||||
|
|
||||||
|
TS_FILES = $${SAMPLESROOT}/Common/src/Common-icon.ts \
|
||||||
|
$${SAMPLESROOT}/Common/src/Common-string.ts \
|
||||||
./src/Tutorial-icon.ts \
|
./src/Tutorial-icon.ts \
|
||||||
./src/Tutorial-string.ts
|
./src/Tutorial-string.ts
|
||||||
|
|
||||||
|
RES_FILES = $${SAMPLESROOT}/Common/res/* \
|
||||||
|
./res/*
|
||||||
|
|
||||||
|
RES_DIR = $$quote($$(RES_DIR))
|
||||||
|
|
||||||
|
INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
|
||||||
|
INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
|
||||||
|
|
||||||
DEFINES = CSFDB
|
DEFINES = CSFDB
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
@ -157,16 +172,34 @@ win32 {
|
|||||||
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
|
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
|
||||||
}
|
}
|
||||||
|
|
||||||
LIBS += -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d -lTKV2d \
|
LIBS += -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d \
|
||||||
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
|
-lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
|
||||||
-lTKSTEPBase -lTKShapeSchema -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
-lTKSTEPBase -lTKShapeSchema -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
|
||||||
-lTKXSBase -lTKPShape -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
-lTKXSBase -lTKPShape -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
|
||||||
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset \
|
-lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset \
|
||||||
|
|
||||||
|
!exists($${RES_DIR}) {
|
||||||
|
win32 {
|
||||||
|
system(mkdir $${RES_DIR})
|
||||||
|
} else {
|
||||||
|
system(mkdir -p $${RES_DIR})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lrelease.name = LRELEASE ${QMAKE_FILE_IN}
|
lrelease.name = LRELEASE ${QMAKE_FILE_IN}
|
||||||
lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm ./res/${QMAKE_FILE_BASE}.qm
|
lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm $${RES_DIR}/${QMAKE_FILE_BASE}.qm
|
||||||
lrelease.output = ./res/${QMAKE_FILE_BASE}.qm
|
lrelease.output = ${QMAKE_FILE_BASE}.qm
|
||||||
lrelease.input = TS_FILES
|
lrelease.input = TS_FILES
|
||||||
lrelease.clean = ./res/${QMAKE_FILE_BASE}.qm
|
lrelease.clean = $${RES_DIR}/${QMAKE_FILE_BASE}.qm
|
||||||
lrelease.CONFIG += no_link target_predeps
|
lrelease.CONFIG += no_link target_predeps
|
||||||
QMAKE_EXTRA_COMPILERS += lrelease
|
QMAKE_EXTRA_COMPILERS += lrelease
|
||||||
|
|
||||||
|
copy_res.name = Copy resource ${QMAKE_FILE_IN}
|
||||||
|
copy_res.output = ${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
|
||||||
|
copy_res.clean = $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
|
||||||
|
copy_res.input = RES_FILES
|
||||||
|
copy_res.CONFIG += no_link target_predeps
|
||||||
|
win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
|
||||||
|
unix: copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
|
||||||
|
QMAKE_EXTRA_COMPILERS += copy_res
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SET RES_DIR=%~dp0res
|
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%"
|
||||||
|
|
||||||
|
@ -17,6 +17,10 @@ if test `uname -s` == "Darwin" && test "${WOKHOME}" == ""; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
host=`uname -s`
|
||||||
|
export STATION=$host
|
||||||
|
export RES_DIR=${aSamplePath}/${STATION}/res
|
||||||
|
|
||||||
export PATH=${QTDIR}/bin:${PATH}
|
export PATH=${QTDIR}/bin:${PATH}
|
||||||
|
|
||||||
source $CASROOT/env.sh
|
source $CASROOT/env.sh
|
||||||
|
@ -6,6 +6,7 @@ REM second argument specifies architecture) (win32 or win64)
|
|||||||
REM third argument specifies Debug or Release mode
|
REM third argument specifies Debug or Release mode
|
||||||
|
|
||||||
call .\..\..\..\env.bat %1 %2 %3
|
call .\..\..\..\env.bat %1 %2 %3
|
||||||
|
call %~dp0env.bat
|
||||||
|
|
||||||
if not "%1" == "" (
|
if not "%1" == "" (
|
||||||
if /I "%1" == "vc8" (
|
if /I "%1" == "vc8" (
|
||||||
|
@ -4,11 +4,6 @@ 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
|
||||||
|
|
||||||
host=`uname -s`
|
|
||||||
STATION=$host
|
|
||||||
|
|
||||||
RES_DIR="${aSamplePath}/res"
|
|
||||||
|
|
||||||
aSystem=`uname -s`
|
aSystem=`uname -s`
|
||||||
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
||||||
if [ "${CASDEB}" == "d" ]; then
|
if [ "${CASDEB}" == "d" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user