aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-06 15:40:02 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-07 09:27:40 +0000
commit9a045f536f283b9bbf66a2bf578589177bbe03e5 (patch)
treed1264043f9a80d1b4426a397328664b508dd1a92
parent9f74476af5c45ac562fb95bf47c06ee8ef3d2c78 (diff)
Windows: Define NOMINMAX for every module
As of 5.10, windows.h is included by qrandom.h in QtCore. Task-number: PYSIDE-431 Change-Id: I69cc5e3275fba09f1a4990a4e5d37253b4664a95 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--sources/pyside2/PySide2/QtCharts/CMakeLists.txt5
-rw-r--r--sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt5
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake2
3 files changed, 2 insertions, 10 deletions
diff --git a/sources/pyside2/PySide2/QtCharts/CMakeLists.txt b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
index 03c07b54..5d6ed6aa 100644
--- a/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
@@ -58,11 +58,6 @@ ${QtCharts_GEN_DIR}/qtcharts_wrapper.cpp
${QtCharts_GEN_DIR}/qtcharts_module_wrapper.cpp
)
-# Sanitize windows.h as pulled by gl.h to prevent clashes with QValueAxis::min(), etc.
-if (WIN32)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX")
-endif()
-
make_path(QtCharts_typesystem_path
${QtCore_SOURCE_DIR}
${QtCore_BINARY_DIR}
diff --git a/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt b/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
index 4e0aecb6..54809807 100644
--- a/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
@@ -41,11 +41,6 @@ ${QtDataVisualization_GEN_DIR}/qtdatavisualization_wrapper.cpp
${QtDataVisualization_GEN_DIR}/qtdatavisualization_module_wrapper.cpp
)
-# Sanitize windows.h as pulled by gl.h to prevent clashes with QAbstract3dAxis::min(), etc.
-if (WIN32)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX")
-endif()
-
make_path(QtDataVisualization_typesystem_path
${QtCore_SOURCE_DIR}
${QtCore_BINARY_DIR}
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index 0b0a6ab8..c4177a8d 100644
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -105,6 +105,8 @@ macro(create_pyside_module
LIBRARY_OUTPUT_DIRECTORY ${pyside2_BINARY_DIR})
if(WIN32)
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
+ # Sanitize windows.h as pulled by gl.h to prevent clashes with QAbstract3dAxis::min(), etc.
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX")
endif()
target_link_libraries(${module_name} ${${module_libraries}})