Skip to content

Build with Local Ospray #2430

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
15 changes: 13 additions & 2 deletions Superbuild/Superbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ OPTION(WITH_TETGEN "Build Tetgen." ON)

###########################################
# Configure ospray
OPTION(WITH_OSPRAY "Build Ospray." OFF)
OPTION(BUILD_OSPRAY "Build Ospray." OFF)

###########################################
# Use local ospray
OPTION(PREBUILT_OSPRAY "Use prebuilt copy of Ospray." OFF)

IF (BUILD_OSPRAY AND PREBUILT_OSPRAY)
MESSAGE(SEND_ERROR "Cannot set both building and prebuilt Ospray.")
ENDIF()

###########################################
# Configure data
Expand Down Expand Up @@ -191,9 +199,12 @@ IF(WITH_TETGEN)
ADD_EXTERNAL( ${SUPERBUILD_DIR}/TetgenExternal.cmake Tetgen_external )
ENDIF()

IF(WITH_OSPRAY)
IF(PREBUILT_OSPRAY)
find_package(ospray 2.10.0 REQUIRED)
ELSEIF(BUILD_OSPRAY)
ADD_EXTERNAL( ${SUPERBUILD_DIR}/OsprayExternal.cmake Ospray_external )
ENDIF()
SET(WITH_OSPRAY (BUILD_OSPRAY || PREBUILT_OSPRAY))

IF(NOT BUILD_HEADLESS)
ADD_EXTERNAL( ${SUPERBUILD_DIR}/QwtExternal.cmake Qwt_external )
Expand Down
4 changes: 4 additions & 0 deletions docs/start/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,9 @@ make
```
Append `-jN`, where N is the number of threads, to build multi-threaded.

### Configuring SCIRun with Prebuilt OSPRay

To use the OsprayViewer module with a prebuilt binary, you need to download from the [releases page](https://github.com/ospray/OSPRay/releases) and extract the zip. Only OSPRay 2.4 and 2.10 have been tested. Then add the directory to your shell's PATH variable. CMake will automatically find it when the flag `PREBUILT_OSPRAY` is enabled.

## Tagging Releases
On an OSX system, run script `release.sh` in the `src` directory with the release name in format ***beta.XX*** as a parameter.