From 7d08df3f8208dff97857596e04455915f36344a8 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Tue, 16 May 2023 18:56:33 +0200 Subject: [PATCH] Fix build on Fedora. Fix portfile license handling. Fix tbb choking on Qt's 'emit' macro. --- cmake/ports/tbb/portfile.cmake | 5 ++--- libraries/shared/src/TBBHelpers.h | 13 +++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/cmake/ports/tbb/portfile.cmake b/cmake/ports/tbb/portfile.cmake index b2a89479f1..0e7b0bc30f 100644 --- a/cmake/ports/tbb/portfile.cmake +++ b/cmake/ports/tbb/portfile.cmake @@ -33,8 +33,7 @@ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/tbb${VCPKG_TARGET_STATIC_LIBRARY_SUFF ) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/TBB") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright) -#file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/libraries/shared/src/TBBHelpers.h b/libraries/shared/src/TBBHelpers.h index 7a53ceaa80..01a25d588d 100644 --- a/libraries/shared/src/TBBHelpers.h +++ b/libraries/shared/src/TBBHelpers.h @@ -17,12 +17,25 @@ #if !defined(Q_MOC_RUN) // Work around https://bugreports.qt.io/browse/QTBUG-80990 + +// This causes a compile error in profiling.h: +// profiling.h:229:15: error: expected unqualified-id before ‘)’ token +// 229 | void emit() { } +// +// 'emit' is defined to nothing in qt and is just syntactic sugar, so get rid of it +#undef emit + #include #include #include #include #include #include + + +// and re-add later. +#define emit + #endif #ifdef _WIN32