summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-07-28 13:09:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-28 14:10:40 +0000
commit7dc6b27ede212b31f7d077f2ca12ea0b953b74ab (patch)
treed962426bf446eb84922323c0e835748a6598cab1
parent9077d7e67fae3b6a99f2a0e759a99324fe871533 (diff)
Fix type library UUID regex
CMake doesn't support regex quantifiers, so need to multiply the number of hexadecimal numbers manually in UUID regex. Add missing LIBRARIES argument to qutlook example. Fixes: QTBUG-95407 Change-Id: I3f3da1e29fe524ed7f03b3764de9139c4fc13a5b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 934bb86f9bb6c8f36e87097c8d74effc13e08f10) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/activeqt/qutlook/CMakeLists.txt2
-rw-r--r--src/activeqt/container/Qt6AxContainerMacros.cmake12
2 files changed, 10 insertions, 4 deletions
diff --git a/examples/activeqt/qutlook/CMakeLists.txt b/examples/activeqt/qutlook/CMakeLists.txt
index 5e009fa..6994f37 100644
--- a/examples/activeqt/qutlook/CMakeLists.txt
+++ b/examples/activeqt/qutlook/CMakeLists.txt
@@ -30,7 +30,7 @@ set_target_properties(qutlook PROPERTIES
MACOSX_BUNDLE TRUE
)
-qt6_target_typelibs(qutlook "msoutl:{00062FFF-0000-0000-C000-000000000046}")
+qt6_target_typelibs(qutlook LIBRARIES "msoutl:{00062FFF-0000-0000-C000-000000000046}")
target_link_libraries(qutlook PUBLIC
Qt::AxContainer
diff --git a/src/activeqt/container/Qt6AxContainerMacros.cmake b/src/activeqt/container/Qt6AxContainerMacros.cmake
index 192d375..7c53c06 100644
--- a/src/activeqt/container/Qt6AxContainerMacros.cmake
+++ b/src/activeqt/container/Qt6AxContainerMacros.cmake
@@ -38,11 +38,17 @@ function(qt6_target_typelibs target)
endif()
set(out_sources "")
- set(hex "[a-fA-F0-9]")
- set(ident_ "[a-fA-F0-9_]")
+
+ # CMake doesn't support quantifiers.
+ set(hex_num "[a-fA-F0-9][a-fA-F0-9]")
+ set(hex_two "${hex_num}${hex_num}")
+ set(hex_four "${hex_two}${hex_two}")
+ set(hex_six "${hex_two}${hex_two}${hex_two}")
+
+ set(ident_ "[a-zA-Z0-9_]")
foreach(lib IN LISTS arg_LIBRARIES)
unset(libpath CACHE)
- if(lib MATCHES "^(${ident_}+):(\\{${hex}{8}-${hex}{4}-${hex}{4}-${hex}{4}-${hex}{12}\\})$")
+ if(lib MATCHES "^(${ident_}+):({${hex_four}-${hex_two}-${hex_two}-${hex_two}-${hex_six}})$")
set(libpath "${CMAKE_MATCH_2}")
set(out_basename "${CMAKE_MATCH_1}")
string(MAKE_C_IDENTIFIER "${out_basename}" out_basename_valid)