From f12bd212b21ab83dc94a382c6d05b5a7612670b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Tue, 30 Apr 2024 00:01:52 -0300 Subject: [PATCH] Updated build. --- .github/workflows/full_win64.yml | 4 --- CMakeLists.txt | 26 ++++++++++++----- bin/upload_sourceforge.sh | 4 +-- bin/zip_pdb.sh | 50 -------------------------------- 4 files changed, 20 insertions(+), 64 deletions(-) delete mode 100644 bin/zip_pdb.sh diff --git a/.github/workflows/full_win64.yml b/.github/workflows/full_win64.yml index 4f41673f3..2e6d15721 100644 --- a/.github/workflows/full_win64.yml +++ b/.github/workflows/full_win64.yml @@ -65,10 +65,6 @@ jobs: - name: Build mrv2 run: | ./runme_nolog.sh reldeb -t package -D TLRENDER_USD=OFF - - - name: Zip pdb files - run: | - ./bin/zip_pdb.sh reldeb - name: Upload binaries # Conditional step run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index f3f2e4140..f1ea3be55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.23) +cmake_minimum_required(VERSION 3.25) @@ -10,12 +10,23 @@ if(APPLE) message( STATUS "-------------------------------------------------" ) endif() +# +# Sanity checks +# if(TLRENDER_NDI) if(NOT EXISTS "${TLRENDER_NDI_SDK}") message(FATAL_ERROR "TLRENDER_NDI is ON but TLRENDER_NDI_SDK does not exist!\n${TLRENDER_NDI_SDK}") endif() endif() +if(MSVC) + if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR + CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") + message(STATUS "Embedding Debug information into executable.") + set(CMAKE_MSVC_DEBUG_INFORMATION TRUE) + endif() +endif() + cmake_policy(SET CMP0091 NEW) cmake_policy(SET CMP0114 NEW) @@ -29,19 +40,17 @@ include( cmake/functions.cmake ) if (APPLE) message(STATUS "OLD_DYLD_LIBRARY_PATH=$ENV{OLD_DYLD_LIBRARY_PATH}") - message( STATUS "-------------------------------------------------" ) + message(STATUS "-------------------------------------------------") message(STATUS "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}") - message( STATUS "-------------------------------------------------" ) + message(STATUS "-------------------------------------------------") elseif(UNIX) message(STATUS "OLD_LD_LIBRARY_PATH=$ENV{OLD_LD_LIBRARY_PATH}") - message( STATUS "-------------------------------------------------" ) message(STATUS "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}") - message( STATUS "-------------------------------------------------" ) + message(STATUS "-------------------------------------------------") else() message(STATUS "OLD_PATH=$ENV{OLD_PATH}") - message( STATUS "-------------------------------------------------" ) message(STATUS "PATH=$ENV{PATH}") - message( STATUS "-------------------------------------------------" ) + message(STATUS "-------------------------------------------------") endif() @@ -115,7 +124,8 @@ elseif(APPLE) # brew .dylibs are compiled only for the current version of the OS. # # We distribute libintl dylib compatible with v10.5 - file(COPY precompiled/macOS/v10.5/ DESTINATION ${CMAKE_INSTALL_PREFIX}/ + file(COPY + precompiled/macOS/v10.5/ DESTINATION ${CMAKE_INSTALL_PREFIX}/ FOLLOW_SYMLINK_CHAIN) endif() endif() diff --git a/bin/upload_sourceforge.sh b/bin/upload_sourceforge.sh index d08c3e1ef..636b25f0f 100755 --- a/bin/upload_sourceforge.sh +++ b/bin/upload_sourceforge.sh @@ -108,7 +108,7 @@ ${date}. It does not support NDIĀ® on any platform. It works on Windows 8.1+ (without USD support), Ubuntu 20.04 LTS+, -macOS 11 (amd64) and macOS M1/M2/M3 (arm64). +macOS 12 (amd64 also without USD support) and macOS M1/M2/M3 (arm64). It may contain bugs, new untested features and more. @@ -118,7 +118,7 @@ You can extract it to compile yourself with: git clone https://github.com/ggarra13/mrv2.git cd mrv2 git checkout ${git_hash} - ./runme.sh + ./runme.sh clean \`\`\` diff --git a/bin/zip_pdb.sh b/bin/zip_pdb.sh deleted file mode 100644 index e524285ba..000000000 --- a/bin/zip_pdb.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# mrv2 -# Copyright Contributors to the mrv2 Project. All rights reserved. - -# -# This Windows script collects all .pdb files of a Debug or RelWithDebInfo -# into a zipfile. -# - - - -. etc/build_dir.sh - -# Install zip just in case - -pacman -Sy zip --noconfirm - - - -# Output zip file name -ZIPFILE="packages/mrv2-Windows-v${mrv2_VERSION}_pdb_files.zip" - -# Make path smaller as it will make -exec fail on GitHub Actions -export PATH=/bin:/usr/bin:/usr/local/bin/ - -find "$BUILD_DIR" -type f -name "*.pdb" -exec zip -v9 $ZIPFILE {} + - -cat <<"EOF" > INSTALL.txt - -To get useful debug stack traces for mrv2, you need to mimic the build -directories of the compilation (you need a D: drive): - -EOF - -echo $PWD >> INSTALL.txt - -cat <<"EOF" >> INSTALL.txt - -and unzip there this file, so that you get: - -EOF - -echo ${PWD}/${BUILD_DIR} >> INSTALL.txt - -zip -v9 $ZIPFILE INSTALL.txt - -rm INSTALL.txt - -echo "PDB files from $BUILD_DIR zipped into $ZIPFILE"