├── .github └── workflows │ └── external.linux.yml ├── .gitignore ├── CMakeLists.txt ├── LICENSE.txt ├── README.md ├── get_glfw.cmake ├── get_ispc.cmake ├── get_snappy.cmake ├── get_tbb.cmake ├── glfw.patch ├── macros.cmake └── third-party-programs.txt /.github/workflows/external.linux.yml: -------------------------------------------------------------------------------- 1 | ## Copyright 2024 Intel Corporation 2 | ## SPDX-License-Identifier: Apache-2.0 3 | 4 | name: Linux 5 | 6 | on: 7 | push: 8 | pull_request: 9 | workflow_dispatch: 10 | 11 | concurrency: 12 | group: ${{ github.workflow }}-${{ github.ref }} 13 | cancel-in-progress: true 14 | 15 | permissions: read-all 16 | 17 | jobs: 18 | build-cpu-rocky-8: 19 | runs-on: ubuntu-latest 20 | container: 21 | image: rockylinux:8 22 | 23 | steps: 24 | - name: Install packages 25 | run: | 26 | echo "Installing build dependencies..." 27 | dnf update -y 28 | dnf group install "Development Tools" -y 29 | dnf install -y git cmake mesa-libGL-devel libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel python3.11-devel 30 | 31 | - name: Checkout Repository 32 | uses: actions/checkout@v4 33 | 34 | - name: Build 35 | run: | 36 | mkdir build 37 | cd build 38 | cmake .. 39 | make -j$(nproc) 40 | 41 | - name: Upload Artifact 42 | uses: actions/upload-artifact@v4 43 | with: 44 | name: build-cpu-rocky-8 45 | path: build/install 46 | 47 | build-cpu-ubuntu-2204: 48 | runs-on: ubuntu-latest 49 | container: 50 | image: ubuntu:22.04 51 | 52 | steps: 53 | - name: Install packages 54 | run: | 55 | echo "Installing build dependencies..." 56 | apt update 57 | apt upgrade -y 58 | apt install -y git build-essential cmake ninja-build libglfw3-dev libgl1-mesa-dev libxinerama-dev libxcursor-dev libxi-dev python3-dev 59 | 60 | - name: Checkout Repository 61 | uses: actions/checkout@v4 62 | 63 | - name: Build 64 | run: | 65 | mkdir build 66 | cd build 67 | cmake .. 68 | make -j$(nproc) 69 | 70 | - name: Upload Artifact 71 | uses: actions/upload-artifact@v4 72 | with: 73 | name: build-cpu-ubuntu-2204 74 | path: build/install -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build*/ 2 | install*/ 3 | .vscode/ 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## Copyright 2021 Intel Corporation 2 | ## SPDX-License-Identifier: Apache-2.0 3 | 4 | cmake_minimum_required(VERSION 3.12) 5 | 6 | if(NOT CMAKE_INSTALL_PREFIX) 7 | set(CMAKE_INSTALL_PREFIX 8 | "${CMAKE_BINARY_DIR}/install" 9 | CACHE STRING "Final install location." FORCE) 10 | endif() 11 | 12 | project(renderkit_superbuild) 13 | 14 | include(CheckCXXCompilerFlag) 15 | include(CMakeDependentOption) 16 | include(ExternalProject) 17 | include(GNUInstallDirs) 18 | include(ProcessorCount) 19 | 20 | include(macros.cmake) 21 | 22 | # Options ## 23 | 24 | cmake_dependent_option( 25 | ENABLE_GPU_SUPPORT 26 | "Enable RenderKit's GPU(SYCL) support" 27 | OFF 28 | "NOT APPLE" 29 | OFF 30 | ) 31 | 32 | set (EMBREE_GPU_SUPPORT ${ENABLE_GPU_SUPPORT}) 33 | set (OIDN_GPU_SUPPORT ${ENABLE_GPU_SUPPORT}) 34 | set (OPENVKL_GPU_SUPPORT ${ENABLE_GPU_SUPPORT}) 35 | set (OSPRAY_GPU_SUPPORT ${ENABLE_GPU_SUPPORT}) 36 | 37 | cmake_dependent_option( 38 | OSPRAY_ENABLE_MODULE_MPI 39 | "Enable OSPRay's MPI module" 40 | OFF 41 | "NOT APPLE" 42 | OFF 43 | ) 44 | 45 | ProcessorCount(PROCESSOR_COUNT) 46 | set(NUM_BUILD_JOBS ${PROCESSOR_COUNT} CACHE STRING "Number of build jobs '-j '") 47 | 48 | set(DEFAULT_BUILD_COMMAND cmake --build . --config release -j ${NUM_BUILD_JOBS}) 49 | 50 | get_filename_component(INSTALL_DIR_ABSOLUTE 51 | ${CMAKE_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}) 52 | 53 | if(APPLE) 54 | set (CMAKE_MACOSX_RPATH_STATE ON) 55 | set (FP_MODEL_CXX_FLAGS "") 56 | 57 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FP_MODEL_CXX_FLAGS}") 58 | 59 | elseif(WIN32) 60 | set (CMAKE_MACOSX_RPATH_STATE OFF) 61 | set (FP_MODEL_CXX_FLAGS "/fp:precise") 62 | 63 | check_cxx_compiler_flag("/fp:precise" _flag_is_fp_model) 64 | check_cxx_compiler_flag("/ffp:precise" _flag_is_ffp_model) 65 | if(_flag_is_fp_model) 66 | set (FP_MODEL_CXX_FLAGS "/fp:precise") 67 | elseif(_flag_is_ffp_model) 68 | set (FP_MODEL_CXX_FLAGS "/ffp:precise") 69 | else() 70 | message(WARNING "Neither /fp: nor /ffp: supported by compiler; some tests may not be repeatable") 71 | set (FP_MODEL_CXX_FLAGS) 72 | endif() 73 | 74 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FP_MODEL_CXX_FLAGS}") 75 | else() 76 | set (CMAKE_MACOSX_RPATH_STATE OFF) 77 | 78 | check_cxx_compiler_flag("-fp-model=precise" _flag_is_fp_model) 79 | check_cxx_compiler_flag("-ffp-model=precise" _flag_is_ffp_model) 80 | if(_flag_is_fp_model) 81 | set (FP_MODEL_CXX_FLAGS "-fp-model=precise") 82 | elseif(_flag_is_ffp_model) 83 | set (FP_MODEL_CXX_FLAGS "-ffp-model=precise") 84 | else() 85 | set (FP_MODEL_CXX_FLAGS) 86 | endif() 87 | 88 | check_cxx_compiler_flag("-fhonor-infinities" _fhonor_infinities) 89 | if(_fhonor_infinities) 90 | set(HONOR_INFINITES_CXX_FLAGS "-fhonor-infinities") 91 | else() 92 | set (HONOR_INFINITES_CXX_FLAGS) 93 | endif() 94 | 95 | check_cxx_compiler_flag("-fhonor-nans" _fhonor_nans) 96 | if(_fhonor_nans) 97 | set(HONOR_NANS_CXX_FLAGS "-fhonor-nans") 98 | else() 99 | set (HONOR_NANS_CXX_FLAGS) 100 | endif() 101 | 102 | check_cxx_compiler_flag("-static-intel" _static_intel) 103 | if(_static_intel) 104 | set(STATIC_INTEL_CXX_FLAGS "-static-intel") 105 | else() 106 | set (STATIC_INTEL_CXX_FLAGS) 107 | endif() 108 | 109 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FP_MODEL_CXX_FLAGS} ${HONOR_INFINITES_CXX_FLAGS} ${HONOR_NANS_CXX_FLAGS} ${STATIC_INTEL_CXX_FLAGS}") 110 | endif() 111 | 112 | ## Build projects ## 113 | 114 | include(get_tbb.cmake) 115 | include(get_ispc.cmake) 116 | include(get_glfw.cmake) 117 | 118 | if(OSPRAY_ENABLE_MODULE_MPI) 119 | include(get_snappy.cmake) 120 | endif() 121 | 122 | set(_RKCOMMON_VERSION 1.14.0) 123 | set(_EMBREE_VERSION 4.3.3) 124 | set(_OPENPGL_VERSION 0.6.0) 125 | set(_OPENVKL_VERSION 2.0.1) 126 | set(_OIDN_VERSION 2.3.0) 127 | set(_OSPRAY_VERSION 3.2.0) 128 | set(_OSPRAY_STUDIO_VERSION 1.1.0) 129 | 130 | build_subproject( 131 | NAME rkcommon 132 | URL "https://github.com/renderkit/rkcommon/archive/refs/tags/v${_RKCOMMON_VERSION}.zip" 133 | BUILD_ARGS 134 | -DTBB_ROOT=${TBB_PATH} 135 | -DINSTALL_DEPS=OFF 136 | -DBUILD_TESTING=OFF 137 | DEPENDS_ON tbb 138 | ) 139 | 140 | build_subproject( 141 | NAME embree 142 | URL "https://github.com/renderkit/embree/archive/refs/tags/v${_EMBREE_VERSION}.zip" 143 | BUILD_ARGS 144 | -DTBB_ROOT=${TBB_PATH} 145 | -DEMBREE_ISPC_SUPPORT=ON 146 | -DEMBREE_ISPC_EXECUTABLE=${ISPC_PATH} 147 | -DEMBREE_SYCL_SUPPORT=${EMBREE_GPU_SUPPORT} 148 | -DEMBREE_TUTORIALS=OFF 149 | -DBUILD_TESTING=OFF 150 | DEPENDS_ON tbb ispc glfw 151 | ) 152 | 153 | build_subproject( 154 | NAME openpgl 155 | URL "https://github.com/renderkit/openpgl/archive/refs/tags/v${_OPENPGL_VERSION}.zip" 156 | BUILD_ARGS 157 | -DTBB_ROOT=${TBB_PATH} 158 | DEPENDS_ON tbb 159 | ) 160 | 161 | build_subproject( 162 | NAME openvkl 163 | URL "https://github.com/renderkit/openvkl/archive/refs/tags/v${_OPENVKL_VERSION}.zip" 164 | BUILD_ARGS 165 | -DTBB_ROOT=${TBB_PATH} 166 | -DISPC_EXECUTABLE=${ISPC_PATH} 167 | -DOPENVKL_ENABLE_DEVICE_GPU=${OPENVKL_GPU_SUPPORT} 168 | -DBUILD_BENCHMARKS=OFF 169 | -DBUILD_EXAMPLES=OFF 170 | -DBUILD_TESTING=OFF 171 | DEPENDS_ON rkcommon embree 172 | ) 173 | 174 | build_subproject( 175 | NAME oidn 176 | URL "https://github.com/renderkit/oidn/releases/download/v${_OIDN_VERSION}/oidn-${_OIDN_VERSION}.src.zip" 177 | BUILD_ARGS 178 | -DTBB_ROOT=${TBB_PATH} 179 | -DISPC_EXECUTABLE=${ISPC_PATH} 180 | -DOIDN_DEVICE_SYCL=${OIDN_GPU_SUPPORT} 181 | -DOIDN_DEVICE_SYCL_AOT_SINGLE_BIN=OFF 182 | -DOIDN_APPS=ON 183 | DEPENDS_ON ispc tbb rkcommon 184 | ) 185 | 186 | build_subproject( 187 | NAME ospray 188 | URL "https://github.com/renderkit/ospray/archive/refs/tags/v${_OSPRAY_VERSION}.zip" 189 | BUILD_ARGS 190 | -DTBB_ROOT=${TBB_PATH} 191 | -DISPC_EXECUTABLE=${ISPC_PATH} 192 | -DBUILD_GPU_SUPPORT=${OSPRAY_GPU_SUPPORT} 193 | -DFIND_LIBRARY_USE_LIB64_PATHS=TRUE 194 | -DOSPRAY_BUILD_ISA=ALL 195 | -DOSPRAY_MODULE_BILINEAR_PATCH=OFF 196 | -DOSPRAY_MODULE_DENOISER=ON 197 | -DOSPRAY_MODULE_MPI=${OSPRAY_ENABLE_MODULE_MPI} 198 | -DOSPRAY_ENABLE_APPS=OFF 199 | -DOSPRAY_STRICT_BUILD=OFF 200 | -DOSPRAY_INSTALL_DEPENDENCIES=OFF 201 | DEPENDS_ON rkcommon openvkl embree oidn glfw $<$:snappy> 202 | ) 203 | 204 | build_subproject( 205 | NAME ospray_studio 206 | URL "https://github.com/renderkit/ospray-studio/archive/refs/tags/v${_OSPRAY_STUDIO_VERSION}.zip" 207 | BUILD_ARGS 208 | -DTBB_ROOT=${TBB_PATH} 209 | -DBUILD_APPS=ON 210 | -DBUILD_PLUGINS=ON 211 | -DBUILD_TESTING=OFF 212 | -DENABLE_OPENIMAGEIO=OFF # These can be enabled if the dependency is pre-installed 213 | -DENABLE_EXR=OFF 214 | -DENABLE_OPENVDB=OFF 215 | -DOSPRAY_INSTALL=OFF 216 | -DUSE_PYSG=ON 217 | DEPENDS_ON ospray rkcommon openvkl embree oidn glfw 218 | ) 219 | 220 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Intel® Rendering Toolkit CMake Superbuild 2 | 3 | This CMake script will pull down Intel® Rendering Toolkit libraries and 4 | build them from source. The result is an install directory with everything in 5 | it (`CMAKE_INSTALL_PREFIX`). 6 | 7 | Requirements: 8 | - A C++-14-capable compiler and libstdc++.so.6.0.21 or greater. 9 | - CMake 3.12 or greater 10 | - Python 3.6 or greater (including development tools) with the following packages 11 | - numpy 12 | - Note: Python 3.9 is validated for Intel® OSPRay Studio's python bindings and supported by Intel® 2022 13 | - Linux system requirements: 14 | - depending on your linux system, you may need to install X11 and GL development libraries 15 | - For other dependencies, see latest release notes of Intel® Rendering Toolkit components 16 | - https://github.com/ospray/rkcommon 17 | - https://github.com/embree/embree 18 | - https://github.com/OpenImageDenoise/oidn 19 | - https://github.com/openvkl/openvkl 20 | - https://github.com/ospray/ospray 21 | - https://github.com/ospray/ospray_studio 22 | - https://github.com/OpenPathGuidingLibrary/openpgl 23 | - https://github.com/ispc/ispc 24 | 25 | Run with: 26 | 27 | ```bash 28 | git clone https://github.com/RenderKit/superbuild 29 | cd superbuild 30 | mkdir build 31 | cd build 32 | cmake .. 33 | cmake --build . 34 | ``` 35 | 36 | To validate OSPRay Studio's python bindings: 37 | 38 | ```bash 39 | export LD_LIBRARY_PATH=/lib 40 | export PYTHONPATH=/lib 41 | python3 /ospray_studio/source/pysg/tutorial/sgTutorial.py 42 | ``` 43 | 44 | By default, all projects will be installed into `build/install` (if following 45 | the above instructions exactly), unless `CMAKE_INSTALL_PREFIX` is set to 46 | somewhere else. 47 | -------------------------------------------------------------------------------- /get_glfw.cmake: -------------------------------------------------------------------------------- 1 | ## Copyright 2009-2021 Intel Corporation 2 | ## SPDX-License-Identifier: Apache-2.0 3 | 4 | set(GLFW_VERSION 3.3.9) 5 | 6 | set(COMPONENT_NAME glfw) 7 | 8 | set(COMPONENT_PATH ${INSTALL_DIR_ABSOLUTE}) 9 | if (INSTALL_IN_SEPARATE_DIRECTORIES) 10 | set(COMPONENT_PATH ${INSTALL_DIR_ABSOLUTE}/${COMPONENT_NAME}) 11 | endif() 12 | 13 | ExternalProject_Add(${COMPONENT_NAME} 14 | PREFIX ${COMPONENT_NAME} 15 | DOWNLOAD_DIR ${COMPONENT_NAME} 16 | STAMP_DIR ${COMPONENT_NAME}/stamp 17 | SOURCE_DIR ${COMPONENT_NAME}/src 18 | BINARY_DIR ${COMPONENT_NAME}/build 19 | GIT_REPOSITORY "https://github.com/glfw/glfw.git" 20 | GIT_TAG "3.3.8" 21 | GIT_SHALLOW ON 22 | CMAKE_ARGS 23 | -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} 24 | -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} 25 | -DCMAKE_INSTALL_PREFIX:PATH=${COMPONENT_PATH} 26 | -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR} 27 | -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} 28 | -DCMAKE_INSTALL_DOCDIR=${CMAKE_INSTALL_DOCDIR} 29 | -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} 30 | -DCMAKE_BUILD_TYPE=${DEPENDENCIES_BUILD_TYPE} 31 | -DGLFW_BUILD_DOCS=OFF 32 | -DGLFW_BUILD_EXAMPLES=OFF 33 | -DGLFW_BUILD_TESTS=OFF 34 | BUILD_COMMAND ${DEFAULT_BUILD_COMMAND} 35 | BUILD_ALWAYS ${ALWAYS_REBUILD} 36 | PATCH_COMMAND git apply -v ${CMAKE_CURRENT_SOURCE_DIR}/glfw.patch 37 | ) 38 | 39 | list(APPEND CMAKE_PREFIX_PATH ${COMPONENT_PATH}) 40 | string(REPLACE ";" "|" CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") 41 | -------------------------------------------------------------------------------- /get_ispc.cmake: -------------------------------------------------------------------------------- 1 | ## Copyright 2021-2025 Intel Corporation 2 | ## SPDX-License-Identifier: Apache-2.0 3 | 4 | set(ISPC_VERSION 1.25.3 CACHE STRING "") 5 | 6 | set(SUBPROJECT_NAME ispc-v${ISPC_VERSION}) 7 | 8 | if (APPLE) 9 | set(ISPC_SUFFIX "macOS.universal.tar.gz") 10 | elseif(WIN32) 11 | set(ISPC_SUFFIX "windows.zip") 12 | else() 13 | set(ISPC_SUFFIX "linux-oneapi.tar.gz") 14 | endif() 15 | 16 | set(ISPC_URL "https://github.com/ispc/ispc/releases/download/v${ISPC_VERSION}/ispc-v${ISPC_VERSION}-${ISPC_SUFFIX}" CACHE STRING "") 17 | 18 | set(_ISPC_SRC_LIB_NAME lib) 19 | set(_ISPC_DST_LIB_NAME lib) 20 | 21 | ExternalProject_Add(ispc 22 | PREFIX ${SUBPROJECT_NAME} 23 | STAMP_DIR ${SUBPROJECT_NAME}/stamp 24 | SOURCE_DIR ${SUBPROJECT_NAME}/src 25 | BINARY_DIR ${SUBPROJECT_NAME} 26 | URL ${ISPC_URL} 27 | CONFIGURE_COMMAND "" 28 | BUILD_COMMAND "" 29 | INSTALL_COMMAND 30 | COMMAND ${CMAKE_COMMAND} -E copy_directory /bin ${INSTALL_DIR_ABSOLUTE}/bin 31 | COMMAND ${CMAKE_COMMAND} -E copy_directory /${_ISPC_SRC_LIB_NAME} ${INSTALL_DIR_ABSOLUTE}/${_ISPC_DST_LIB_NAME} 32 | COMMAND ${CMAKE_COMMAND} -E copy_directory /include ${INSTALL_DIR_ABSOLUTE}/include 33 | BUILD_ALWAYS OFF 34 | ) 35 | 36 | set(ISPC_PATH "${INSTALL_DIR_ABSOLUTE}/bin/ispc${CMAKE_EXECUTABLE_SUFFIX}") 37 | append_cmake_prefix_path(${INSTALL_DIR_ABSOLUTE}/${_ISPC_DST_LIB_NAME}/cmake/ispcrt-${ISPC_VERSION}) 38 | 39 | -------------------------------------------------------------------------------- /get_snappy.cmake: -------------------------------------------------------------------------------- 1 | ## Copyright 2021 Intel Corporation 2 | ## SPDX-License-Identifier: Apache-2.0 3 | 4 | set(SNAPPY_VERSION 1.1.10) 5 | 6 | set(COMPONENT_NAME snappy) 7 | 8 | if (INSTALL_IN_SEPARATE_DIRECTORIES) 9 | set(COMPONENT_PATH ${INSTALL_DIR_ABSOLUTE}/${COMPONENT_NAME}) 10 | else() 11 | set(COMPONENT_PATH ${INSTALL_DIR_ABSOLUTE}) 12 | endif() 13 | 14 | ExternalProject_Add(${COMPONENT_NAME} 15 | URL "https://github.com/google/snappy/archive/refs/tags/${SNAPPY_VERSION}.zip" 16 | 17 | # # Skip updating on subsequent builds (faster) 18 | UPDATE_COMMAND "" 19 | 20 | CMAKE_ARGS 21 | -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} 22 | -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} 23 | -DCMAKE_INSTALL_PREFIX:PATH=${COMPONENT_PATH} 24 | -DBUILD_SHARED_LIBS:BOOL=OFF 25 | -DSNAPPY_BUILD_TESTS:BOOL=OFF 26 | -DSNAPPY_BUILD_BENCHMARKS:BOOL=OFF 27 | -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON 28 | -DCMAKE_BUILD_TYPE=${DEPENDENCIES_BUILD_TYPE} 29 | ) 30 | 31 | list(APPEND CMAKE_PREFIX_PATH ${COMPONENT_PATH}) 32 | string(REPLACE ";" "|" CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") 33 | -------------------------------------------------------------------------------- /get_tbb.cmake: -------------------------------------------------------------------------------- 1 | ## Copyright 2021 Intel Corporation 2 | ## SPDX-License-Identifier: Apache-2.0 3 | 4 | set(TBB_VERSION 2021.11.0) 5 | 6 | set(SUBPROJECT_NAME oneapi-tbb-${TBB_VERSION}) 7 | 8 | if (APPLE) 9 | set(TBB_SUFFIX mac.tgz) 10 | elseif(WIN32) 11 | set(TBB_SUFFIX win.zip) 12 | else() 13 | set(TBB_SUFFIX lin.tgz) 14 | endif() 15 | 16 | set(TBB_URL "https://github.com/oneapi-src/oneTBB/releases/download/v${TBB_VERSION}/${SUBPROJECT_NAME}-${TBB_SUFFIX}") 17 | 18 | ExternalProject_Add(tbb 19 | PREFIX ${SUBPROJECT_NAME} 20 | STAMP_DIR ${SUBPROJECT_NAME}/stamp 21 | SOURCE_DIR ${SUBPROJECT_NAME}/unpacked 22 | BINARY_DIR "" 23 | URL ${TBB_URL} 24 | CONFIGURE_COMMAND "" 25 | BUILD_COMMAND "" 26 | INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory /lib ${INSTALL_DIR_ABSOLUTE}/lib 27 | BUILD_ALWAYS OFF 28 | ) 29 | 30 | set(TBB_PATH "${CMAKE_BINARY_DIR}/${SUBPROJECT_NAME}/unpacked") 31 | -------------------------------------------------------------------------------- /glfw.patch: -------------------------------------------------------------------------------- 1 | From 8dfd5804447a1f35c15e650737fee3694bc71f26 Mon Sep 17 00:00:00 2001 2 | Date: Mon, 6 Feb 2023 17:29:44 +0100 3 | Subject: [PATCH] fix LoadLibraryA 4 | 5 | --- 6 | src/null_platform.h | 2 +- 7 | src/wgl_context.c | 2 +- 8 | src/win32_init.c | 12 ++++++------ 9 | src/win32_platform.h | 2 +- 10 | 4 files changed, 9 insertions(+), 9 deletions(-) 11 | 12 | diff --git a/src/null_platform.h b/src/null_platform.h 13 | index 708975d1..d916b922 100644 14 | --- a/src/null_platform.h 15 | +++ b/src/null_platform.h 16 | @@ -43,7 +43,7 @@ 17 | #include "null_joystick.h" 18 | 19 | #if defined(_GLFW_WIN32) 20 | - #define _glfw_dlopen(name) LoadLibraryA(name) 21 | + #define _glfw_dlopen(name) LoadLibraryExA(name,NULL,LOAD_LIBRARY_SEARCH_SYSTEM32) 22 | #define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle) 23 | #define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name) 24 | #else 25 | diff --git a/src/wgl_context.c b/src/wgl_context.c 26 | index 72ad11de..5c42fa81 100644 27 | --- a/src/wgl_context.c 28 | +++ b/src/wgl_context.c 29 | @@ -416,7 +416,7 @@ GLFWbool _glfwInitWGL(void) 30 | if (_glfw.wgl.instance) 31 | return GLFW_TRUE; 32 | 33 | - _glfw.wgl.instance = LoadLibraryA("opengl32.dll"); 34 | + _glfw.wgl.instance = LoadLibraryExA("opengl32.dll",NULL,LOAD_LIBRARY_SEARCH_SYSTEM32); 35 | if (!_glfw.wgl.instance) 36 | { 37 | _glfwInputErrorWin32(GLFW_PLATFORM_ERROR, 38 | diff --git a/src/win32_init.c b/src/win32_init.c 39 | index 885f32fa..5e698cc2 100644 40 | --- a/src/win32_init.c 41 | +++ b/src/win32_init.c 42 | @@ -82,7 +82,7 @@ static GLFWbool loadLibraries(void) 43 | return GLFW_FALSE; 44 | } 45 | 46 | - _glfw.win32.user32.instance = LoadLibraryA("user32.dll"); 47 | + _glfw.win32.user32.instance = LoadLibraryExA("user32.dll",NULL,LOAD_LIBRARY_SEARCH_SYSTEM32); 48 | if (!_glfw.win32.user32.instance) 49 | { 50 | _glfwInputErrorWin32(GLFW_PLATFORM_ERROR, 51 | @@ -105,7 +105,7 @@ static GLFWbool loadLibraries(void) 52 | _glfw.win32.user32.GetSystemMetricsForDpi_ = (PFN_GetSystemMetricsForDpi) 53 | GetProcAddress(_glfw.win32.user32.instance, "GetSystemMetricsForDpi"); 54 | 55 | - _glfw.win32.dinput8.instance = LoadLibraryA("dinput8.dll"); 56 | + _glfw.win32.dinput8.instance = LoadLibraryExA("dinput8.dll",NULL,LOAD_LIBRARY_SEARCH_SYSTEM32); 57 | if (_glfw.win32.dinput8.instance) 58 | { 59 | _glfw.win32.dinput8.Create = (PFN_DirectInput8Create) 60 | @@ -126,7 +126,7 @@ static GLFWbool loadLibraries(void) 61 | 62 | for (i = 0; names[i]; i++) 63 | { 64 | - _glfw.win32.xinput.instance = LoadLibraryA(names[i]); 65 | + _glfw.win32.xinput.instance = LoadLibraryExA(names[i],NULL,LOAD_LIBRARY_SEARCH_SYSTEM32); 66 | if (_glfw.win32.xinput.instance) 67 | { 68 | _glfw.win32.xinput.GetCapabilities = (PFN_XInputGetCapabilities) 69 | @@ -139,7 +139,7 @@ static GLFWbool loadLibraries(void) 70 | } 71 | } 72 | 73 | - _glfw.win32.dwmapi.instance = LoadLibraryA("dwmapi.dll"); 74 | + _glfw.win32.dwmapi.instance = LoadLibraryExA("dwmapi.dll",NULL,LOAD_LIBRARY_SEARCH_SYSTEM32); 75 | if (_glfw.win32.dwmapi.instance) 76 | { 77 | _glfw.win32.dwmapi.IsCompositionEnabled = (PFN_DwmIsCompositionEnabled) 78 | @@ -152,7 +152,7 @@ static GLFWbool loadLibraries(void) 79 | GetProcAddress(_glfw.win32.dwmapi.instance, "DwmGetColorizationColor"); 80 | } 81 | 82 | - _glfw.win32.shcore.instance = LoadLibraryA("shcore.dll"); 83 | + _glfw.win32.shcore.instance = LoadLibraryExA("shcore.dll",NULL,LOAD_LIBRARY_SEARCH_SYSTEM32); 84 | if (_glfw.win32.shcore.instance) 85 | { 86 | _glfw.win32.shcore.SetProcessDpiAwareness_ = (PFN_SetProcessDpiAwareness) 87 | @@ -161,7 +161,7 @@ static GLFWbool loadLibraries(void) 88 | GetProcAddress(_glfw.win32.shcore.instance, "GetDpiForMonitor"); 89 | } 90 | 91 | - _glfw.win32.ntdll.instance = LoadLibraryA("ntdll.dll"); 92 | + _glfw.win32.ntdll.instance = LoadLibraryExA("ntdll.dll",NULL,LOAD_LIBRARY_SEARCH_SYSTEM32); 93 | if (_glfw.win32.ntdll.instance) 94 | { 95 | _glfw.win32.ntdll.RtlVerifyVersionInfo_ = (PFN_RtlVerifyVersionInfo) 96 | diff --git a/src/win32_platform.h b/src/win32_platform.h 97 | index bf703d7e..55b8425b 100644 98 | --- a/src/win32_platform.h 99 | +++ b/src/win32_platform.h 100 | @@ -289,7 +289,7 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)( 101 | #define _GLFW_WNDCLASSNAME L"GLFW30" 102 | #endif 103 | 104 | -#define _glfw_dlopen(name) LoadLibraryA(name) 105 | +#define _glfw_dlopen(name) LoadLibraryExA(name,NULL,LOAD_LIBRARY_SEARCH_SYSTEM32) 106 | #define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle) 107 | #define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name) 108 | 109 | -- 110 | 2.38.1.windows.1 111 | 112 | -------------------------------------------------------------------------------- /macros.cmake: -------------------------------------------------------------------------------- 1 | ## Copyright 2020 Intel Corporation 2 | ## SPDX-License-Identifier: Apache-2.0 3 | 4 | macro(append_cmake_prefix_path) 5 | list(APPEND CMAKE_PREFIX_PATH ${ARGN}) 6 | string(REPLACE ";" "|" CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") 7 | endmacro() 8 | 9 | macro(setup_subproject_path_vars _NAME) 10 | set(SUBPROJECT_NAME ${_NAME}) 11 | 12 | set(SUBPROJECT_INSTALL_PATH ${INSTALL_DIR_ABSOLUTE}) 13 | 14 | set(SUBPROJECT_SOURCE_PATH ${SUBPROJECT_NAME}/source) 15 | set(SUBPROJECT_STAMP_PATH ${SUBPROJECT_NAME}/stamp) 16 | set(SUBPROJECT_BUILD_PATH ${SUBPROJECT_NAME}/build) 17 | endmacro() 18 | 19 | macro(build_subproject) 20 | # See cmake_parse_arguments docs to see how args get parsed here: 21 | # https://cmake.org/cmake/help/latest/command/cmake_parse_arguments.html 22 | set(oneValueArgs NAME URL CUSTOM_SOURCE_PACKAGE_PATH) 23 | set(multiValueArgs BUILD_ARGS DEPENDS_ON PATCH_COMMAND) 24 | cmake_parse_arguments(BUILD_SUBPROJECT "" "${oneValueArgs}" 25 | "${multiValueArgs}" ${ARGN}) 26 | 27 | # Setup SUBPROJECT_* variables (containing paths) for this function 28 | setup_subproject_path_vars(${BUILD_SUBPROJECT_NAME}) 29 | 30 | message("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}") 31 | 32 | # Build the actual subproject 33 | ExternalProject_Add(${SUBPROJECT_NAME} 34 | PREFIX ${SUBPROJECT_NAME} 35 | DOWNLOAD_DIR ${SUBPROJECT_NAME} 36 | STAMP_DIR ${SUBPROJECT_STAMP_PATH} 37 | SOURCE_DIR ${SUBPROJECT_SOURCE_PATH} 38 | BINARY_DIR ${SUBPROJECT_BUILD_PATH} 39 | URL ${BUILD_SUBPROJECT_URL} 40 | LIST_SEPARATOR | # Use the alternate list separator 41 | CMAKE_ARGS 42 | -DCMAKE_BUILD_TYPE=Release 43 | -DCMAKE_NINJA_CMCLDEPS_RC=OFF 44 | -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} 45 | -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} 46 | -DCMAKE_INSTALL_PREFIX:PATH=${SUBPROJECT_INSTALL_PATH} 47 | -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR} 48 | -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} 49 | -DCMAKE_INSTALL_DOCDIR=${CMAKE_INSTALL_DOCDIR} 50 | -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} 51 | -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} 52 | -DPython3_ROOT_DIR=${Python3_ROOT_DIR} 53 | ${BUILD_SUBPROJECT_BUILD_ARGS} 54 | BUILD_COMMAND ${DEFAULT_BUILD_COMMAND} 55 | PATCH_COMMAND ${BUILD_SUBPROJECT_PATCH_COMMAND} 56 | BUILD_ALWAYS OFF 57 | ) 58 | 59 | if(BUILD_SUBPROJECT_DEPENDS_ON) 60 | ExternalProject_Add_StepDependencies(${SUBPROJECT_NAME} 61 | configure ${BUILD_SUBPROJECT_DEPENDS_ON} 62 | ) 63 | endif() 64 | 65 | # Place installed component on CMAKE_PREFIX_PATH for downstream consumption 66 | append_cmake_prefix_path(${SUBPROJECT_INSTALL_PATH}) 67 | endmacro() -------------------------------------------------------------------------------- /third-party-programs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RenderKit/superbuild/1038a46b2b3aca7b9f52773fbc6d8e4af1c73b28/third-party-programs.txt --------------------------------------------------------------------------------