aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Herrmann <adrian.herrmann@qt.io>2022-08-22 10:58:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-22 12:54:58 +0000
commitc1934fb0662d372034d2d0f3bed414401c1580fe (patch)
treef42c21b3c9c3896764073c7364a220efe84e7004
parent2e8dbc776abcf4df1618a57e92df0d9cc4138cb9 (diff)
Fix binding,scriptable examples when no build type
Fix a problem where building the samplebinding, widgetbinding and scriptableapplication examples would fail if the CMAKE_BUILD_TYPE variable was not explicitly set. Amends f9f620436058efe93d086c5214955c4d56e70e26. Change-Id: I6fa8afc386d259a16812bd69148d6299f3b70233 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit c9269fc4e55b467773d80cfb05739b3b11a0b35d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/samplebinding/CMakeLists.txt4
-rw-r--r--examples/scriptableapplication/CMakeLists.txt2
-rw-r--r--examples/widgetbinding/CMakeLists.txt4
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt
index 6de44b6ae..665316623 100644
--- a/examples/samplebinding/CMakeLists.txt
+++ b/examples/samplebinding/CMakeLists.txt
@@ -42,7 +42,7 @@ set(generated_sources
# ================================== Shiboken detection ======================================
# Use provided python interpreter if given.
if(NOT python_interpreter)
- if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+ if(WIN32 AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
find_program(python_interpreter "python_d")
if(NOT python_interpreter)
message(FATAL_ERROR
@@ -173,7 +173,7 @@ set_property(TARGET ${bindings_library} PROPERTY PREFIX "")
set_property(TARGET ${bindings_library} PROPERTY OUTPUT_NAME
"${bindings_library}${PYTHON_EXTENSION_SUFFIX}")
if(WIN32)
- if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set_property(TARGET ${bindings_library} PROPERTY SUFFIX "_d.pyd")
else()
set_property(TARGET ${bindings_library} PROPERTY SUFFIX ".pyd")
diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt
index ff1cda25e..430932815 100644
--- a/examples/scriptableapplication/CMakeLists.txt
+++ b/examples/scriptableapplication/CMakeLists.txt
@@ -18,7 +18,7 @@ find_package(Qt6 COMPONENTS Widgets)
# Use provided python interpreter if given.
if(NOT python_interpreter)
- if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+ if(WIN32 AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
find_program(python_interpreter "python_d")
if(NOT python_interpreter)
message(FATAL_ERROR
diff --git a/examples/widgetbinding/CMakeLists.txt b/examples/widgetbinding/CMakeLists.txt
index 2fe1ddcb0..c51f47620 100644
--- a/examples/widgetbinding/CMakeLists.txt
+++ b/examples/widgetbinding/CMakeLists.txt
@@ -52,7 +52,7 @@ set(generated_sources
# ================================== Shiboken detection ======================================
# Use provided python interpreter if given.
if(NOT python_interpreter)
- if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+ if(WIN32 AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
find_program(python_interpreter "python_d")
if(NOT python_interpreter)
message(FATAL_ERROR
@@ -218,7 +218,7 @@ set_property(TARGET ${bindings_library} PROPERTY PREFIX "")
set_property(TARGET ${bindings_library} PROPERTY OUTPUT_NAME
"${bindings_library}${PYTHON_EXTENSION_SUFFIX}")
if(WIN32)
- if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set_property(TARGET ${bindings_library} PROPERTY SUFFIX "_d.pyd")
else()
set_property(TARGET ${bindings_library} PROPERTY SUFFIX ".pyd")