mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
########## Windows using vcpkg ###################
|
|
1. Clone VCPKG
|
|
git clone https://github.com/microsoft/vcpkg.git
|
|
2. Install VCPKG from within vcpkg folder:
|
|
.\boostrap-vcpkg.bat
|
|
3. Install GRPC
|
|
.\vcpkg install grpc --triplet x64-windows
|
|
|
|
4. Python
|
|
* Install Python 3
|
|
* Execute the following using Python3
|
|
python -m pip install grpcio-tools
|
|
* Make sure the python executable is found by setting -DPYTHON_EXECUTABLE=LOCATION_OF_PYTHON.EXE
|
|
|
|
4. Run cmake with the following statements
|
|
-DRESINSIGHT_ENABLE_GRPC=true
|
|
-DPYTHON_EXECUTABLE=LOCATION_OF_PYTHON.EXE
|
|
-DCMAKE_TOOLCHAIN_FILE=LOCATION_OF_VCPKG/scripts/buildsystems/vcpkg.cmake
|
|
-A x64
|
|
|
|
############ Linux as STANDALONE GPRC (using GRPC_INSTALL_PREFIX=/opt/grpc as an example) ###############
|
|
1. Clone grpc
|
|
git clone https://github.com/grpc/grpc.git
|
|
2. From within grpc folder, check out stable version of grpc and initialise repo:
|
|
git checkout v1.20.1
|
|
git submodule init
|
|
git submodule update
|
|
3. Make sure you're building with devtools-3, since you'll be using that for ResInsight too
|
|
scl enable devtoolset-3 bash
|
|
export PROTOBUF_CONFIG_OPTS="--prefix=/opt/grpc"
|
|
make prefix=/opt/grpc
|
|
sudo make prefix=/opt/grpc install
|
|
4. Install protobuf (still within grpc folder)
|
|
cd third_party/protobuf
|
|
sudo make install
|
|
5. Make sure you have a Python 3 version available in your paths.
|
|
I.e.: "sudo yum install rh-python35" and then "scl enable rh-python35 bash"
|
|
6. Install grpcio-tools for Python (this may have to be done as root user):
|
|
pip install grpcio-tools
|
|
7. Run cmake making sure GRPC_INSTALL_PREFIX is set to /opt/grpc, PYTHON_EXECUTABLE set to a good python 3 and RESINSIGHT_ENABLE_GRPC = true
|
|
|