Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
414d826
Add full SYCL support for Windows builds with device matrix [cpu, cud…
Copilot Jun 12, 2026
cacc469
Address code review suggestions: centralize oneAPI download URLs, opt…
Copilot Jun 12, 2026
6c46132
Improve robustness of oneAPI installer process checks, check ONEAPI_R…
Copilot Jun 12, 2026
e7de201
Fix double 'cp' prefix in test-wheel error message
Copilot Jun 12, 2026
68c33c0
use python venv oneapi runtime at import.
ssheorey Jun 16, 2026
8bb1d12
fix
ssheorey Jun 16, 2026
c685dc6
fix install
ssheorey Jun 17, 2026
e1e2359
fix component names
ssheorey Jun 17, 2026
a69ac2f
fix installer components
ssheorey Jun 18, 2026
256c855
fix
ssheorey Jun 18, 2026
bd42668
debug prints
ssheorey Jun 18, 2026
8c4b844
fix oneapi install, setup.
ssheorey Jun 19, 2026
174be2a
fix cmake + oneapi setup
ssheorey Jun 20, 2026
15b66dd
fix 2
ssheorey Jun 20, 2026
b211876
Fix Windows xpu CI: use icx (MSVC-compatible) instead of icpx for CXX…
Copilot Jul 2, 2026
07eb47c
Fix SOURCE_DIR typo → SRC_DIR and update icx comment in install script
Copilot Jul 2, 2026
28d6cee
Merge branch 'main' into copilot/add-full-sycl-support-windows
ssheorey Jul 2, 2026
209c6c7
Fix Windows SYCL CI: use TBB::tbb target and remove duplicate ze_wrap…
ssheorey Jul 7, 2026
09b8d38
Fix Windows xpu CI: correct build dir var in iterative example build,…
ssheorey Jul 7, 2026
3840981
Fix Windows SYCL (xpu) build: /MP, MSVC STL SAL macro, and MT/MD runt…
ssheorey Jul 7, 2026
4062379
Fix Windows xpu CI: persist oneAPI env vars across workflow steps
ssheorey Jul 8, 2026
27eb424
Fix Windows xpu CI: suppress ICX -Wcharacter-conversion in googletest…
Copilot Jul 8, 2026
211cf59
Fix librealsense target features under icx and macos gfortran install…
ssheorey Jul 9, 2026
0194e87
Merge branch 'main' into copilot/add-full-sycl-support-windows
ssheorey Jul 9, 2026
47f6644
Support win32 single config generators in WebRTC prebuilt down-loader
ssheorey Jul 9, 2026
3f635a6
Revert accidental style changes to pointcloud.cpp
ssheorey Jul 9, 2026
431e836
Fix librealsense exceptions by preserving /EHsc flag when building wi…
ssheorey Jul 9, 2026
be6586f
relasense fix 2
ssheorey Jul 10, 2026
129c32e
Fix Windows XPU build: link WebRTC dynamically on SYCL and support si…
ssheorey Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ jobs:

- name: Install dependencies
run: |
brew install ccache glslang spirv-cross
# Fix gfortran not found issue.
brew install gcc
brew install ccache glslang spirv-cross gcc
# Fix gfortran not found issue
ln -s $(brew --prefix gcc)/bin/gfortran-* /usr/local/bin/gfortran

ccache -M 2G # See .github/workflows/readme.md for ccache strategy.
Expand Down
324 changes: 274 additions & 50 deletions .github/workflows/windows.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ cmake-build-release/
util/pip_package/dist/
doxygen/
node_modules/
.yarn

# Editor files
*.*~
Expand Down
12 changes: 9 additions & 3 deletions 3rdparty/README_SYCL.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,15 @@ Open3D is designed to make use of the SYCL GPU devices.

## List of oneAPI Python packages

To make `pip install open3d` works out-of-the box on SYCL-enabled platforms,
we can utilize runtime libraries released via PyPI. This feature needs to be
implemented.
Open3D SYCL wheels declare a dependency on `dpcpp-cpp-rt` (see
`python/requirements_sycl.txt`). Pip installs the transitive Intel runtime
packages into the same Python environment. On Linux, ``pybind`` RPATH finds
``<venv>/lib``; on Windows, ``open3d/__init__.py`` registers
``site-packages/*.data/data/Library/bin`` with ``add_dll_directory``.

Windows CI (xpu) installs build-time oneAPI from Intel Base + HPC webimages with
selective components only (``util/ci_install_oneapi_windows_sycl.ps1``, aligned
with `oneapi-ci <https://github.com/oneapi-src/oneapi-ci/tree/0804a4c9281440d8a91ac0680388b101e5f673ad>`_).

User:
- https://pypi.org/user/IntelAutomationEngineering/
Expand Down
11 changes: 10 additions & 1 deletion 3rdparty/civetweb/civetweb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ ExternalProject_Add(
-DCIVETWEB_DISABLE_CGI=ON
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=$<BOOL:${GLIBCXX_USE_CXX11_ABI}> $<$<PLATFORM_ID:Windows>:/EHsc>"
# Note: on Windows, keep this as a single flag (no embedded space by
# combining with another flag in the same string). The Intel
# oneAPI DPC++/C++ compiler (icx), used when BUILD_SYCL_MODULE=ON,
# parses each CMAKE_ARGS string as one literal argv token; a
# combined "-D<macro> /EHsc" string gets misparsed by icx as the
# macro's value swallowing "/EHsc", silently leaving exceptions
# disabled (MSVC cl.exe tolerates this, icx does not). Since
# _GLIBCXX_USE_CXX11_ABI only matters for libstdc++ (not used on
# Windows/MSVC STL), it is safe to only set one flag per platform.
-DCMAKE_CXX_FLAGS=$<IF:$<PLATFORM_ID:Windows>,/EHsc,-D_GLIBCXX_USE_CXX11_ABI=$<BOOL:${GLIBCXX_USE_CXX11_ABI}>>
${ExternalProject_CMAKE_ARGS_hidden}
BUILD_BYPRODUCTS
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}civetweb${CMAKE_STATIC_LIBRARY_SUFFIX}
Expand Down
40 changes: 30 additions & 10 deletions 3rdparty/embree/embree.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,43 @@ endif()


if(WIN32)
set(WIN_CMAKE_ARGS "-DCMAKE_CXX_FLAGS_DEBUG=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MTd,/MDd> ${CMAKE_CXX_FLAGS_DEBUG_INIT}"
"-DCMAKE_CXX_FLAGS_RELEASE=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MT,/MD> ${CMAKE_CXX_FLAGS_RELEASE_INIT}"
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MT,/MD> ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}"
"-DCMAKE_CXX_FLAGS_MINSIZEREL=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MT,/MD> ${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}"
"-DCMAKE_C_FLAGS_DEBUG=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MTd,/MDd> ${CMAKE_C_FLAGS_DEBUG_INIT}"
"-DCMAKE_C_FLAGS_RELEASE=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MT,/MD> ${CMAKE_C_FLAGS_RELEASE_INIT}"
"-DCMAKE_C_FLAGS_RELWITHDEBINFO=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MT,/MD> ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}"
"-DCMAKE_C_FLAGS_MINSIZEREL=$<IF:$<BOOL:${STATIC_WINDOWS_RUNTIME}>,/MT,/MD> ${CMAKE_C_FLAGS_MINSIZEREL_INIT}"
# icx.exe hard-errors ("invalid argument 'MT' not allowed with
# '-fsycl'") when compiling any translation unit with -fsycl together
# with the static (/MT, /MTd) MSVC runtime. Since embree's SYCL support
# (embree4_sycl, ze_wrapper) is built in the same ExternalProject
# configure/build as the non-SYCL ISA libs, force the dynamic runtime
# (/MD, /MDd) for all of embree's libs when BUILD_SYCL_MODULE=ON,
# regardless of STATIC_WINDOWS_RUNTIME. This also matches upstream
# embree's own Windows SYCL build docs, which never enable
# USE_STATIC_RUNTIME (default OFF) together with EMBREE_SYCL_SUPPORT.
if(BUILD_SYCL_MODULE)
set(EMBREE_USE_STATIC_RUNTIME OFF)
else()
set(EMBREE_USE_STATIC_RUNTIME ${STATIC_WINDOWS_RUNTIME})
endif()
set(WIN_CMAKE_ARGS "-DCMAKE_CXX_FLAGS_DEBUG=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MTd,/MDd> ${CMAKE_CXX_FLAGS_DEBUG_INIT}"
"-DCMAKE_CXX_FLAGS_RELEASE=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MT,/MD> ${CMAKE_CXX_FLAGS_RELEASE_INIT}"
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MT,/MD> ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}"
"-DCMAKE_CXX_FLAGS_MINSIZEREL=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MT,/MD> ${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}"
"-DCMAKE_C_FLAGS_DEBUG=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MTd,/MDd> ${CMAKE_C_FLAGS_DEBUG_INIT}"
"-DCMAKE_C_FLAGS_RELEASE=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MT,/MD> ${CMAKE_C_FLAGS_RELEASE_INIT}"
"-DCMAKE_C_FLAGS_RELWITHDEBINFO=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MT,/MD> ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}"
"-DCMAKE_C_FLAGS_MINSIZEREL=$<IF:$<BOOL:${EMBREE_USE_STATIC_RUNTIME}>,/MT,/MD> ${CMAKE_C_FLAGS_MINSIZEREL_INIT}"
)
else()
set(WIN_CMAKE_ARGS "")
endif()


if(BUILD_SYCL_MODULE)
set(ISA_ARGS ${ISA_ARGS} -DCMAKE_CXX_COMPILER=icpx)
# On Windows, icx.exe (MSVC-compatible) handles C++ and SYCL (-fsycl).
# icpx.exe (GNU-like in oneAPI 2025.3+) conflicts with MSVC-style flags
# generated by CMake when using Ninja on Windows.
if(WIN32)
set(ISA_ARGS ${ISA_ARGS} -DCMAKE_CXX_COMPILER=icx)
else()
set(ISA_ARGS ${ISA_ARGS} -DCMAKE_CXX_COMPILER=icpx)
endif()
set(ISA_ARGS ${ISA_ARGS} -DCMAKE_C_COMPILER=icx)
set(ISA_ARGS ${ISA_ARGS} -DEMBREE_SYCL_SUPPORT=ON)
list(APPEND ISA_LIBS embree4_sycl ze_wrapper)
Expand Down Expand Up @@ -102,7 +123,6 @@ ExternalProject_Add(
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}sys${CMAKE_STATIC_LIBRARY_SUFFIX}
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}math${CMAKE_STATIC_LIBRARY_SUFFIX}
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}tasking${CMAKE_STATIC_LIBRARY_SUFFIX}
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}ze_wrapper${CMAKE_STATIC_LIBRARY_SUFFIX}
${ISA_BUILD_BYPRODUCTS}
)

Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/filament/filament_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ExternalProject_Add(
-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
-DCMAKE_CXX_FLAGS:STRING=${filament_cxx_flags}
-DCMAKE_INSTALL_PREFIX=${FILAMENT_ROOT}
-DUSE_STATIC_CRT=${STATIC_WINDOWS_RUNTIME}
-DUSE_STATIC_CRT=$<IF:$<BOOL:${BUILD_SYCL_MODULE}>,OFF,${STATIC_WINDOWS_RUNTIME}>
-DUSE_STATIC_LIBCXX=ON
-DFILAMENT_SKIP_SDL2=ON
-DFILAMENT_SKIP_SAMPLES=ON
Expand Down
6 changes: 5 additions & 1 deletion 3rdparty/filament/filament_download.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ else()
if(WIN32)
set(FILAMENT_URL https://github.com/google/filament/releases/download/v1.54.0/filament-v1.54.0-windows.tgz)
set(FILAMENT_SHA256 370b85dbaf1a3be26a5a80f60c912f11887748ddd1c42796a83fe989f5805f7b)
if (STATIC_WINDOWS_RUNTIME)
# Note: when BUILD_SYCL_MODULE is ON, Open3D forces the dynamic
# (/MD, /MDd) MSVC runtime for the whole project regardless of
# STATIC_WINDOWS_RUNTIME (icx rejects -fsycl combined with the
# static runtime), so the prebuilt Filament libs must match.
if (STATIC_WINDOWS_RUNTIME AND NOT BUILD_SYCL_MODULE)
string(APPEND lib_dir /x86_64/mt)
else()
string(APPEND lib_dir /x86_64/md)
Expand Down
22 changes: 19 additions & 3 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,10 @@ if(BUILD_GUI)
set(FILAMENT_RUNTIME_VER x86_64)
endif()
else() # WIN32
if (STATIC_WINDOWS_RUNTIME)
# Match the prebuilt Filament archive's runtime selection in
# filament_download.cmake: SYCL builds always use the dynamic
# runtime regardless of STATIC_WINDOWS_RUNTIME.
if (STATIC_WINDOWS_RUNTIME AND NOT BUILD_SYCL_MODULE)
set(FILAMENT_RUNTIME_VER "x86_64/mt$<$<CONFIG:DEBUG>:d>")
else()
set(FILAMENT_RUNTIME_VER "x86_64/md$<$<CONFIG:DEBUG>:d>")
Expand Down Expand Up @@ -1608,16 +1611,29 @@ if(OPEN3D_USE_ONEAPI_PACKAGES)
set(MKL_THREADING tbb_thread)
set(MKL_LINK static)
find_package(MKL REQUIRED)
# oneAPI MKL's lib layout differs by platform: Linux nests libs under an
# "intel64" subdirectory, while Windows (verified with oneAPI 2025.3)
# places them directly in "lib".
if(WIN32)
set(MKL_LIB_DIR ${MKL_ROOT}/lib)
else()
set(MKL_LIB_DIR ${MKL_ROOT}/lib/intel64)
endif()
open3d_import_3rdparty_library(3rdparty_mkl
HIDDEN
GROUPED
INCLUDE_DIRS ${MKL_INCLUDE}/
LIB_DIR ${MKL_ROOT}/lib/intel64
LIB_DIR ${MKL_LIB_DIR}
LIBRARIES $<$<BOOL:${BUILD_SYCL_MODULE}>:mkl_sycl> mkl_intel_ilp64 mkl_tbb_thread mkl_core
)
if (BUILD_SYCL_MODULE)
# target_link_options(3rdparty_mkl INTERFACE "-Wl,-export-dynamic")
target_link_libraries(3rdparty_mkl INTERFACE OpenCL)
if (WIN32)
find_package(OpenCL REQUIRED)
target_link_libraries(3rdparty_mkl INTERFACE OpenCL::OpenCL)
else()
target_link_libraries(3rdparty_mkl INTERFACE OpenCL)
endif()
endif()
# MKL definitions
target_compile_options(3rdparty_mkl INTERFACE "$<$<PLATFORM_ID:Linux,Darwin>:$<$<COMPILE_LANGUAGE:CXX>:-m64>>")
Expand Down
11 changes: 11 additions & 0 deletions 3rdparty/googletest/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@ FetchContent_Declare(

FetchContent_MakeAvailable(ext_googletest)
FetchContent_GetProperties(ext_googletest SOURCE_DIR GOOGLETEST_SOURCE_DIR)

# Suppress -Wcharacter-conversion error in googletest when using IntelLLVM/ICX.
# ICX's Clang front-end treats the implicit char16_t->char32_t conversion in
# gtest-printers.h(524) as a hard error. Suppress it on FetchContent targets.
if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
foreach(_gt_tgt gtest gtest_main gmock gmock_main)
if(TARGET ${_gt_tgt})
target_compile_options(${_gt_tgt} PRIVATE -Wno-character-conversion)
endif()
endforeach()
endif()
11 changes: 10 additions & 1 deletion 3rdparty/jsoncpp/jsoncpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ include(ExternalProject)

find_package(Git QUIET REQUIRED)

# SYCL builds always force the dynamic (/MD, /MDd) MSVC runtime for the
# whole project regardless of STATIC_WINDOWS_RUNTIME (icx rejects -fsycl
# combined with the static runtime), so jsoncpp must match.
if(BUILD_SYCL_MODULE)
set(JSONCPP_USE_STATIC_RUNTIME OFF)
else()
set(JSONCPP_USE_STATIC_RUNTIME ${STATIC_WINDOWS_RUNTIME})
endif()

ExternalProject_Add(
ext_jsoncpp
PREFIX jsoncpp
Expand All @@ -19,7 +28,7 @@ ExternalProject_Add(
-DBUILD_OBJECT_LIBS=OFF
-DJSONCPP_WITH_TESTS=OFF
-DJSONCPP_USE_CXX11_ABI=${GLIBCXX_USE_CXX11_ABI}
-DJSONCPP_STATIC_WINDOWS_RUNTIME=${STATIC_WINDOWS_RUNTIME}
-DJSONCPP_STATIC_WINDOWS_RUNTIME=${JSONCPP_USE_STATIC_RUNTIME}
${ExternalProject_CMAKE_ARGS_hidden}
BUILD_BYPRODUCTS
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libjpeg-turbo/libjpeg-turbo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ else()
message(STATUS "NASM assembler not found - libjpeg-turbo performance may suffer")
endif()

if (STATIC_WINDOWS_RUNTIME)
if (STATIC_WINDOWS_RUNTIME AND NOT BUILD_SYCL_MODULE)
set(WITH_CRT_DLL OFF)
else()
set(WITH_CRT_DLL ON)
Expand Down
22 changes: 20 additions & 2 deletions 3rdparty/librealsense/librealsense.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,25 @@ endif()
set(LIBREALSENSE_CMAKE_C_FLAGS "")
set(LIBREALSENSE_CMAKE_CXX_FLAGS "")
set(LIBREALSENSE_EXTRA_CMAKE_ARGS "")
if(NOT WIN32)
if(WIN32)
# icx (IntelLLVM), used as the CXX/C compiler for Windows SYCL (xpu) builds,
# enforces target-feature checks that MSVC's cl.exe does not: librealsense's
# SSE helper files (sse-align.cpp, sse-pointcloud.cpp, sse imagery) call
# always_inline intrinsics like _mm_shuffle_epi8 without enabling ssse3 for
# the translation unit, which fails to compile under icx with "requires
# target feature 'ssse3'". Explicitly enable ssse3 for icx on Windows; Clang
# accepts -m<feature> flags even in its MSVC-compatible ("icx.exe") driver
# mode. Start from the inherited ${CMAKE_CXX_FLAGS} (which already carries
# CMake's standard Windows defaults, e.g. /DWIN32 /D_WINDOWS /EHsc) rather
# than a hardcoded literal, so librealsense's WIN32-guarded code (e.g.
# rostime's sys/timeb.h vs sys/time.h switch) keeps seeing WIN32 defined.
if(BUILD_SYCL_MODULE)
list(APPEND LIBREALSENSE_EXTRA_CMAKE_ARGS
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -mssse3"
"-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -mssse3"
)
endif()
else()
if(LIBUSB1_CMAKE_C_FLAGS_EXTRA)
set(LIBREALSENSE_CMAKE_C_FLAGS "${LIBUSB1_CMAKE_C_FLAGS_EXTRA}")
list(APPEND LIBREALSENSE_EXTRA_CMAKE_ARGS "-DCMAKE_C_FLAGS=${LIBUSB1_CMAKE_C_FLAGS_EXTRA}")
Expand All @@ -55,6 +73,7 @@ if(NOT WIN32)
if(LIBUSB1_CMAKE_CXX_FLAGS_EXTRA)
set(LIBREALSENSE_CMAKE_CXX_FLAGS "${LIBREALSENSE_CMAKE_CXX_FLAGS} ${LIBUSB1_CMAKE_CXX_FLAGS_EXTRA}")
endif()
list(APPEND LIBREALSENSE_EXTRA_CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${LIBREALSENSE_CMAKE_CXX_FLAGS}")
endif()

ExternalProject_Add(
Expand Down Expand Up @@ -84,7 +103,6 @@ ExternalProject_Add(
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
# Syncing GLIBCXX_USE_CXX11_ABI for MSVC causes problems, but directly
# checking CXX_COMPILER_ID is not supported.
$<IF:$<PLATFORM_ID:Windows>,"",-DCMAKE_CXX_FLAGS=${LIBREALSENSE_CMAKE_CXX_FLAGS}>
$<$<PLATFORM_ID:Darwin>:-DBUILD_WITH_OPENMP=OFF>
$<$<PLATFORM_ID:Darwin>:-DHWM_OVER_XU=OFF>
$<$<PLATFORM_ID:Windows>:-DBUILD_WITH_STATIC_CRT=${STATIC_WINDOWS_RUNTIME}>
Expand Down
7 changes: 6 additions & 1 deletion 3rdparty/vtk/vtk_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,12 @@ else() #### download prebuilt vtk
)
set(VTK_SHA256 28e36654ed18aa9f668a0486a6c3d26a0ca6cf6a593dbd15be4736b40880a82b)
elseif(WIN32)
if (STATIC_WINDOWS_RUNTIME)
# Note: when BUILD_SYCL_MODULE is ON, Open3D's own CMakeLists.txt
# forces the dynamic (/MD, /MDd) MSVC runtime for the whole project
# regardless of STATIC_WINDOWS_RUNTIME (icx rejects -fsycl combined
# with the static runtime). The prebuilt VTK archive must match, or
# linking fails with LNK2038 "RuntimeLibrary mismatch" errors.
if (STATIC_WINDOWS_RUNTIME AND NOT BUILD_SYCL_MODULE)
set(VTK_URL
https://github.com/isl-org/open3d_downloads/releases/download/vtk/vtk_${VTK_VERSION}_win_staticrt.tar.gz
)
Expand Down
16 changes: 10 additions & 6 deletions 3rdparty/webrtc/webrtc_download.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ if (APPLE)
)
set(WEBRTC_SHA256 3c2592a3bd9efcee591924007857342fec3753e2ae68695baeb2b8774f0e3abc)
elseif (WIN32)
if (BUILD_SHARED_LIBS AND STATIC_WINDOWS_RUNTIME)
if (BUILD_SHARED_LIBS AND STATIC_WINDOWS_RUNTIME AND NOT BUILD_SYCL_MODULE)
message(FATAL_ERROR "Pre-built WebRTC does not support "
"BUILD_SHARED_LIBS=ON with STATIC_WINDOWS_RUNTIME=ON. Use "
"STATIC_WINDOWS_RUNTIME=OFF or BUILD_WEBRTC_FROM_SOURCE=ON.")
endif()
if(STATIC_WINDOWS_RUNTIME)
if(STATIC_WINDOWS_RUNTIME AND NOT BUILD_SYCL_MODULE)
set(WEBRTC_DEBUG_TAG Debug_mt)
set(WEBRTC_DEBUG_SHA256 b537cce72f758fbcd214fbca80ecfb26228d23c728119abc499c4b333e5f0786)
set(WEBRTC_RELEASE_TAG Release_mt)
Expand Down Expand Up @@ -59,13 +59,14 @@ else() # Linux
set(WEBRTC_URL
${WEBRTC_BASE_URL}/webrtc_${WEBRTC_VER}_linux_cxx-abi-1.tar.xz
)
set(WEBRTC_SHA256 0209f722974fa7b9da9d1c8e279694cf2c4db81e079a325bcadb1b6e0c3b6981) # 1b529bf448d5abd07ec1f8d310ee5c94bd79e84fe563ae1562420f8e478cc202
set(WEBRTC_SHA256 0209f722974fa7b9da9d1c8e279694cf2c4db81e079a325bcadb1b6e0c3b6981)
endif()

if(WIN32 AND WEBRTC_MULTI_CONFIG)
# ExternalProject_Add cannot vary URL per config; use add_custom_command + webrtc_fetch_variant.cmake.
set(WEBRTC_PREBUILT_ROOT "${CMAKE_BINARY_DIR}/webrtc/$<CONFIG>")
set(WEBRTC_STAMP "${WEBRTC_PREBUILT_ROOT}/webrtc_fetch.stamp")
set(WEBRTC_LIB_DIR "${WEBRTC_PREBUILT_ROOT}/lib")
add_custom_command(
OUTPUT "${WEBRTC_STAMP}"
COMMAND ${CMAKE_COMMAND}
Expand All @@ -74,11 +75,13 @@ if(WIN32 AND WEBRTC_MULTI_CONFIG)
"-DDEST=${WEBRTC_PREBUILT_ROOT}"
"-DSTAMP=${WEBRTC_STAMP}"
-P "${CMAKE_CURRENT_LIST_DIR}/webrtc_fetch_variant.cmake"
BYPRODUCTS
${WEBRTC_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc${CMAKE_STATIC_LIBRARY_SUFFIX}
${WEBRTC_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc_extra${CMAKE_STATIC_LIBRARY_SUFFIX}
COMMENT "Downloading prebuilt WebRTC ($<CONFIG>)"
VERBATIM
)
add_custom_target(ext_webrtc_all DEPENDS "${WEBRTC_STAMP}")
set(WEBRTC_LIB_DIR "${WEBRTC_PREBUILT_ROOT}/lib")
else()
ExternalProject_Add(
ext_webrtc
Expand All @@ -90,13 +93,14 @@ else()
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ""
BUILD_BYPRODUCTS
<SOURCE_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc${CMAKE_STATIC_LIBRARY_SUFFIX}
<SOURCE_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc_extra${CMAKE_STATIC_LIBRARY_SUFFIX}
)
ExternalProject_Get_Property(ext_webrtc SOURCE_DIR)
# Prebuilt layout: flat include/ and lib/ at archive root (M149 packages).
set(WEBRTC_PREBUILT_ROOT ${SOURCE_DIR})
set(WEBRTC_LIB_DIR ${WEBRTC_PREBUILT_ROOT}/lib)

add_custom_target(ext_webrtc_all)
add_dependencies(ext_webrtc_all ext_webrtc)
endif()
Expand Down
Loading
Loading