From 7ecde89008f9ed39c357b606d3bc231ba4360ee2 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 27 May 2025 10:01:21 +0800 Subject: Pass configuration phase with vcpkg replacing MSYS2 I happen to be using just Git Bash for convenience for running the commands on the Windows build instructions, hence the build folder pattern to be ignored from the result of running `uname -s` there. The instructions omit the part where you install vcpkg and set the VCPKG_ROOT environment variable, cause it depends on where you install vcpkg to your liking, but the next commands will rely on that variable being set correctly. The CMake used here is MS VS 2022 Community Edition's one, since it will know where the C++ compiler is. $VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin is where pkg-config.exe can be found. $VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2 is where xmllint.exe can be found (from libxml2[tools]). PKG_CONFIG_LIBDIR and PYTHON environment settings are pretty self-explanatory. The flags set on LL_BUILD are now for Visual C++ and not MinGW(64)'s GCC or Clang any more, and copied from most of the flags in the variables file from LL's build-variables repo. vcpkg's apr & apr-util packages don't seem to install their .pc files, hence the manual target_include/link_directories/libraries settings, relying on some automatically generated INTERNAL CMake variable called prefix_result. vcpkg's Boost needs the same treatment, plus some suffix. We still use LL's prebuilt libs for OpenSSL, libcurl and WebRTC. Actually too for ColladaDOM for now, but we prepare Windows ColladaDOM self-building for later. For GLM and Meshoptimizer too, it's just the checking that's skipped otherwise it would fail (but the vcpkg packages can be used). Visual C++ doesn't recognise the no-deprecated-declarations compile option. On Visual C++, the macro to denote x86-64 seems to be _M_X64 (if not added there, it would try to find sse2neon :)) We still aren't using Autobuild here for Windows either, hence the FALSE-d viewer_manifest.py based file bundling. --- indra/cmake/WebRTC.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/cmake/WebRTC.cmake') diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index 19457924d8..454ed8c0a1 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -6,9 +6,9 @@ include_guard() add_library( ll::webrtc INTERFACE IMPORTED ) target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp") -if (${LINUX_DISTRO} MATCHES debian OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64) +if (${LINUX_DISTRO} MATCHES debian OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR WINDOWS) use_prebuilt_binary(webrtc) -elseif (NOT (WINDOWS OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) +elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) target_compile_definitions(ll::webrtc INTERFACE CM_WEBRTC=1) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) if (DARWIN) @@ -17,14 +17,14 @@ elseif (NOT (WINDOWS OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) set(WEBRTC_PLATFORM linux-arm64) else () set(WEBRTC_PLATFORM linux-x64) - endif (DARWIN) + endif () if (NOT EXISTS ${CMAKE_BINARY_DIR}/libwebrtc-${WEBRTC_PLATFORM}.tar.xz) file(DOWNLOAD https://github.com/crow-misia/libwebrtc-bin/releases/download/114.5735.6.1/libwebrtc-${WEBRTC_PLATFORM}.tar.xz ${CMAKE_BINARY_DIR}/libwebrtc-${WEBRTC_PLATFORM}.tar.xz SHOW_PROGRESS ) - endif (NOT EXISTS ${CMAKE_BINARY_DIR}/libwebrtc-${WEBRTC_PLATFORM}.tar.xz) + endif () file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/libwebrtc-${WEBRTC_PLATFORM}.tar.xz DESTINATION ${LIBS_PREBUILT_DIR} @@ -74,10 +74,10 @@ elseif (NOT (WINDOWS OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) ${ARCH_PREBUILT_DIRS_RELEASE}/WebRTC.framework ) file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/Frameworks) - endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + endif () file(WRITE ${PREBUILD_TRACKING_DIR}/webrtc_installed "0") - endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) -endif (${LINUX_DISTRO} MATCHES debian OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64) + endif () +endif () if (WINDOWS) target_link_libraries( ll::webrtc INTERFACE webrtc.lib ) -- cgit v1.2.3