Skip to content

Commit

Permalink
msvc build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 29, 2021
1 parent 2d7ac57 commit f76af64
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion cmake/SIPMacros.cmake
Expand Up @@ -35,12 +35,16 @@
# SIP_EXTRA_OPTIONS - Extra command line options which should be passed on to
# SIP.

# SIP_BUILD_EXTRA_OPTIONS - Extra command line options which should be passed on to
# sip-build.

SET(SIP_INCLUDES)
SET(SIP_TAGS)
SET(SIP_CONCAT_PARTS 16)
SET(SIP_DISABLE_FEATURES)
SET(SIP_EXTRA_OPTIONS)
SET(SIP_EXTRA_OBJECTS)
SET(SIP_BUILD_EXTRA_OPTIONS)

MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP SIP_FILES CPP_FILES)

Expand Down Expand Up @@ -97,7 +101,7 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP SIP_FILES CPP_FILES
ENDIF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} )
ENDFOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} )

SET(SIPCMD ${SIP_BUILD_EXECUTABLE} --no-make --concatenate=${SIP_CONCAT_PARTS} --qmake=${QMAKE_EXECUTABLE} --include-dir=${CMAKE_CURRENT_BINARY_DIR})
SET(SIPCMD ${SIP_BUILD_EXECUTABLE} --no-make --concatenate=${SIP_CONCAT_PARTS} --qmake=${QMAKE_EXECUTABLE} --include-dir=${CMAKE_CURRENT_BINARY_DIR} ${SIP_BUILD_EXTRA_OPTIONS})

ADD_CUSTOM_COMMAND(
OUTPUT ${_sip_output_files}
Expand Down
Expand Up @@ -492,7 +492,7 @@ Fill in histogram defaults if not specified
maximum = PyFloat_AsDouble( a4 );
}

#if defined(SIP_PROTECTED_IS_PUBLIC) || SIP_VERSION >= 0x050000
#if defined(SIP_PROTECTED_IS_PUBLIC) || (SIP_VERSION >= 0x050000 && !defined(_MSC_VER))
sipCpp->initHistogram( *a0, a1, a2, minimum, maximum, *a5, a6, a7 );
#else
sipCpp->sipProtect_initHistogram( *a0, a1, a2, minimum, maximum, *a5, a6, a7 );
Expand Down
Expand Up @@ -11,6 +11,7 @@




class QgsSettingsRegistryCore : QgsSettingsRegistry
{
%Docstring(signature="appended")
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterinterface.h
Expand Up @@ -540,7 +540,7 @@ class CORE_EXPORT QgsRasterInterface
maximum = PyFloat_AsDouble( a4 );
}

#if defined(SIP_PROTECTED_IS_PUBLIC) || SIP_VERSION >= 0x050000
#if defined(SIP_PROTECTED_IS_PUBLIC) || (SIP_VERSION >= 0x050000 && !defined(_MSC_VER))
sipCpp->initHistogram( *a0, a1, a2, minimum, maximum, *a5, a6, a7 );
#else
sipCpp->sipProtect_initHistogram( *a0, a1, a2, minimum, maximum, *a5, a6, a7 );
Expand Down
2 changes: 2 additions & 0 deletions src/core/settings/qgssettingsregistrycore.h
Expand Up @@ -28,6 +28,8 @@
#include "qgsmaplayerproxymodel.h"

#ifdef _MSC_VER
#include "qgsunittypes.h"

template class CORE_EXPORT QgsSettingsEntryEnumFlag<QgsSnappingConfig::SnappingTypes> SIP_SKIP;
template class CORE_EXPORT QgsSettingsEntryEnumFlag<QgsTolerance::UnitType> SIP_SKIP;
template class CORE_EXPORT QgsSettingsEntryEnumFlag<Qgis::JoinStyle> SIP_SKIP;
Expand Down

0 comments on commit f76af64

Please sign in to comment.