Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5, 6.6, 6.7
-
None
-
ae2f1ed3d (dev), 6671df0fb (6.7)
Description
When using the EXPORT_MACRO it's expected that the custom macro name will be used for C++ export macros
cmake_minimum_required(VERSION 3.16) find_package(Qt6 COMPONENTS Protobuf Grpc) qt_add_protobuf(my_test PROTO_FILES test.proto EXPORT_MACRO "NOT_MY_TEST")
Actual result:
/* This file is autogenerated. DO NOT CHANGE. All changes will be lost */ #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_MY_TEST_LIB) # define QPB_MY_TEST_EXPORT Q_DECL_EXPORT # else # define QPB_MY_TEST_EXPORT Q_DECL_IMPORT # endif #else # define QPB_MY_TEST_EXPORT #endif
Expected result:
/* This file is autogenerated. DO NOT CHANGE. All changes will be lost */ #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_NOT_MY_TEST_LIB) # define QPB_NOT_MY_TEST_EXPORT Q_DECL_EXPORT # else # define QPB_NOT_MY_TEST_EXPORT Q_DECL_IMPORT # endif #else # define QPB_NOT_MY_TEST_EXPORT #endif