diff --git a/CMakeLists.txt b/CMakeLists.txt index 6eb8cad91b..94d9799970 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,9 +160,6 @@ if(MAYA_APP_VERSION VERSION_GREATER 2024) set(WANT_QT_VERSION 6.5) find_package(Qt6 ${WANT_QT_VERSION} COMPONENTS Core Widgets QUIET) if (Qt6_FOUND) - # QT_NO_KEYWORDS prevents Qt from defining the foreach, signals, slots and emit macros. - # This avoids overlap between Qt macros and boost, and enforces using Q_ macros. - set_target_properties(Qt6::Core PROPERTIES INTERFACE_COMPILE_DEFINITIONS QT_NO_KEYWORDS) if (CODE_COVERAGE) set(BUILD_HDSB_PLUGIN FALSE) message(STATUS "Code coverage enabled, Hydra Scene Browser will not be built.") diff --git a/lib/adskHydraSceneBrowser/lib/CMakeLists.txt b/lib/adskHydraSceneBrowser/lib/CMakeLists.txt index bcba451854..cdcd5433a0 100644 --- a/lib/adskHydraSceneBrowser/lib/CMakeLists.txt +++ b/lib/adskHydraSceneBrowser/lib/CMakeLists.txt @@ -136,6 +136,10 @@ target_include_directories(${TARGET_NAME} # ----------------------------------------------------------------------------- # compiler configuration # ----------------------------------------------------------------------------- +# QT_NO_KEYWORDS prevents Qt from defining the foreach, signals, slots and emit macros. +# this avoids overlap between Qt macros and boost, and enforces using Q_ macros. +set_target_properties(Qt6::Core PROPERTIES INTERFACE_COMPILE_DEFINITIONS QT_NO_KEYWORDS) + target_compile_definitions(${TARGET_NAME} PRIVATE HDUI_EXPORT diff --git a/test/lib/mayaUsd/render/mayaToHydra/cpp/CMakeLists.txt b/test/lib/mayaUsd/render/mayaToHydra/cpp/CMakeLists.txt index 0aa3b325ed..9d6214a2a4 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/cpp/CMakeLists.txt +++ b/test/lib/mayaUsd/render/mayaToHydra/cpp/CMakeLists.txt @@ -39,6 +39,10 @@ target_sources(${TARGET_NAME} # ----------------------------------------------------------------------------- # compiler configuration # ----------------------------------------------------------------------------- +# QT_NO_KEYWORDS prevents Qt from defining the foreach, signals, slots and emit macros. +# this avoids overlap between Qt macros and boost, and enforces using Q_ macros. +set_target_properties(Qt6::Core PROPERTIES INTERFACE_COMPILE_DEFINITIONS QT_NO_KEYWORDS) + mayaHydra_compile_config(${TARGET_NAME}) target_compile_definitions(${TARGET_NAME}