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

Build customization for ASRV.

This commit is contained in:
msv 2021-04-07 15:19:28 +03:00
parent 185d29b92f
commit 1b29197cc9
6 changed files with 169 additions and 2 deletions

31
README-ASRV.txt Normal file
View File

@ -0,0 +1,31 @@
Instruction for building OCCT for ASRV
======================================
Build using regular native compiler
-----------------------------------
1. Make sure the directory 3rdparty is next to occt. It must contain the following products:
freetype
tcltk
2. Change current directory to adm/scripts.
3. On Windows run the script cmake_gen.bat.
On Linux run 'cmake_gen.sh' for release build and 'cmake_gen.sh -d' for debug build.
4. Go to build directory and build and install OCCT.
On Windows run:
build.bat
build.bat vc14 64 d
install.bat
install.bat vc14 64 d
On Linux run:
make -j4 install
Build using Emscripten to generate libs for Web assembly
--------------------------------------------------------
1. Make sure you have installed Emscripten. For that you can make sure occ-web3d directory
is next to occt. It must contain fips\fips-sdks\emsdk.
2. Make sure the directory 3rdparty is next to occt. It must contain the following products:
freetype wasm build
3. Change current directory to adm/scripts.
4. Run the script wasm_build.bat (wasm_build.sh on Linux).
5. Copy installed files from work/wasm to the 3rdparty under occt77-wasm.

View File

@ -1,2 +0,0 @@
*custom.bat
*custom.sh

View File

@ -0,0 +1,48 @@
rem Environment configuration template for cmake_gen.bat (to be renamed as cmake_gen_custom.bat)
set "OCCT3RDPARTY=%SrcRoot%\..\3rdparty"
set VS=14
set VSDATA=2015
rem Leave VSPLATFORM empty to build for x86 platform
set VSPLATFORM=Win64
rem ------------------------------------
rem Uncomment to customize building steps
rem ------------------------------------
rem set "BUILD_DIR=build-vs%VS%-%VSPLATFORM%"
set "INSTALL_DIR=%SrcRoot%\..\3rdparty\occt77-vc14-64"
rem set BUILD_DOC_Overview=OFF
rem set BUILD_Inspector=OFF
rem set BUILD_LIBRARY_TYPE=Shared
rem set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
rem set BUILD_WITH_DEBUG=OFF
rem set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
rem set BUILD_USE_PCH=OFF
rem set BUILD_FORCE_RelWithDebInfo=OFF
rem Use semicolon-separated list of toolkits if you want to disable all modules
rem and build only some toolkits.
rem set BUILD_ADDITIONAL_TOOLKITS=
rem Set a directory recognized as a patch for OCCT.
rem set BUILD_PATCH=
rem set BUILD_MODULE_ApplicationFramework=ON
rem set BUILD_MODULE_DataExchange=ON
rem set BUILD_MODULE_Draw=ON
rem set BUILD_MODULE_ModelingAlgorithms=ON
rem set BUILD_MODULE_ModelingData=ON
rem set BUILD_MODULE_Visualization=ON
rem set USE_D3D=OFF
rem set USE_FFMPEG=OFF
set USE_FREEIMAGE=ON
rem set USE_GLES2=OFF
rem set USE_RAPIDJSON=OFF
rem set USE_DRACO=OFF
rem set USE_TBB=OFF
rem set USE_VTK=OFF

View File

@ -0,0 +1,43 @@
# Environment configuration template for cmake_gen.sh (to be renamed as cmake_gen_custom.sh)
OCCT3RDPARTY="$SrcRoot/../3rdparty"
FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1"
# ------------------------------------
# Uncomment to customize building steps
# ------------------------------------
#BUILD_DIR=build
INSTALL_DIR="$SrcRoot/../3rdparty/occt77"
#BUILD_DOC_Overview=OFF
#BUILD_Inspector=OFF
#BUILD_LIBRARY_TYPE=Shared
#BUILD_RELEASE_DISABLE_EXCEPTIONS=ON
#BUILD_WITH_DEBUG=OFF
#BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON
# Use semicolon-separated list of toolkits if you want to disable all modules
# and build only some toolkits.
#BUILD_ADDITIONAL_TOOLKITS=
# Set a directory recognized as a patch for OCCT.
#BUILD_PATCH=
#BUILD_MODULE_ApplicationFramework=ON
#BUILD_MODULE_DataExchange=ON
#BUILD_MODULE_Draw=ON
#BUILD_MODULE_ModelingAlgorithms=ON
#BUILD_MODULE_ModelingData=ON
#BUILD_MODULE_Visualization=ON
#USE_FFMPEG=OFF
USE_FREEIMAGE=ON
#USE_GLES2=OFF
#USE_RAPIDJSON=OFF
#USE_DRACO=OFF
#USE_TBB=OFF
#USE_VTK=OFF
# This is to add any additional arguments to cmake
#AUX_ARGS=

View File

@ -0,0 +1,29 @@
rem Environment configuration template for wasm_build.bat (to be renamed as wasm_custom.bat)
set "EMSDK_ROOT=%aCasSrc%\..\occ-web3d\fips\fips-sdks\emsdk"
set "aFreeType=%aCasSrc%\..\3rdparty\freetype-2.7.1-wasm"
rem set "aRapidJson=%aCasSrc%\..\3rdparty\rapidjson-1.1.0"
rem set "aDraco=%aCasSrc%\..\3rdparty\draco-1.4.1-wasm32"
rem set "aCmakeBin=%ProgramW6432%\CMake\bin"
rem Uncomment to customize building steps
rem set "aBuildRoot=work"
rem set "toCMake=1"
rem set "toClean=0"
rem set "toMake=1"
rem set "toInstall=1"
set "toPack=0"
set "toDebug=0"
set "toBuildSample=0"
rem Source map base (should point to server where C++ sources will be copied)
rem enables -g4 debug building option for WebGL sample and allows navigating C++ source code within JavaScript debugger.
rem set "sourceMapBase=http://localhost:9090/"
set "BUILD_ModelingData=OFF"
set "BUILD_ModelingAlgorithms=OFF"
rem set "BUILD_Visualization=ON"
set "BUILD_ApplicationFramework=OFF"
set "BUILD_DataExchange=OFF"
set "USE_RAPIDJSON=OFF"
set "USE_DRACO=OFF"
set "USE_PTHREADS=OFF"

View File

@ -0,0 +1,18 @@
# environment configuration template for occ_build_wasm.sh (to be renamed as wasm_custom_env.sh)
export aFreeType="$aSrcRoot/../3rdparty/freetype-2.7.1-wasm"
export EMSDK_ROOT="$aSrcRoot/../occ-web3d/fips/fips-sdks/emsdk"
# Uncomment to customize building steps
#export aBuildRoot=work
#export toCMake=1
#export toClean=0
#export toMake=1
#export toInstall=1
export BUILD_ModelingData=OFF
export BUILD_ModelingAlgorithms=OFF
#export BUILD_Visualization=ON
export BUILD_ApplicationFramework=OFF
export BUILD_DataExchange=OFF
export aNbJobs=10