Skip to content
Permalink
Browse files

osgeo4w: vc16 updates

  • Loading branch information
jef-n committed Apr 1, 2021
1 parent b065d5e commit c5ea4b220cbbd7c7a56b7c4cea59bfce454a0c05
@@ -26,7 +26,7 @@ FIND_PATH(PDAL_INCLUDE_DIR pdal/pdal.hpp
)
FIND_PATH(PDAL_INCLUDE_DIR pdal/pdal.hpp)

FIND_LIBRARY(PDAL_CPP_LIBRARY NAMES pdalccpp libpdalcpp PATHS
FIND_LIBRARY(PDAL_CPP_LIBRARY NAMES pdalcpp libpdalcpp PATHS
"$ENV{LIB_DIR}/lib"
c:/msys/local/lib
NO_DEFAULT_PATH
@@ -9,15 +9,7 @@ SET(PYUIC_PROG_NAMES pyuic5)
SET(PYRCC_PROG_NAME pyrcc5)

IF(NOT PYUIC_PROGRAM)
IF (MSVC)
FIND_PROGRAM(PYUIC_PROGRAM
NAMES ${PYUIC_PROG_NAME}.bat
PATHS $ENV{LIB_DIR}/bin
)
ELSE(MSVC)
FIND_PROGRAM(PYUIC_PROGRAM NAMES ${PYUIC_PROG_NAMES} PATHS $ENV{LIB_DIR}/bin)
ENDIF (MSVC)

FIND_PROGRAM(PYUIC_PROGRAM NAMES ${PYUIC_PROG_NAMES} PATHS $ENV{LIB_DIR}/bin)
IF (NOT PYUIC_PROGRAM)
MESSAGE(FATAL_ERROR "pyuic5 not found - aborting")
ENDIF (NOT PYUIC_PROGRAM)
@@ -53,15 +45,7 @@ MACRO(PYQT_WRAP_UI outfiles )
ENDMACRO(PYQT_WRAP_UI)

IF(NOT PYRCC_PROGRAM)
IF (MSVC)
FIND_PROGRAM(PYRCC_PROGRAM
NAMES ${PYRCC_PROG_NAME}.bat
PATHS $ENV{LIB_DIR}/bin
)
ELSE(MSVC)
FIND_PROGRAM(PYRCC_PROGRAM ${PYRCC_PROG_NAME} PATHS $ENV{LIB_DIR}/bin)
ENDIF (MSVC)

FIND_PROGRAM(PYRCC_PROGRAM NAMES ${PYRCC_PROG_NAME} PATHS $ENV{LIB_DIR}/bin)
IF (NOT PYRCC_PROGRAM)
MESSAGE(FATAL_ERROR "pyrcc5 not found - aborting")
ENDIF (NOT PYRCC_PROGRAM)
@@ -50,7 +50,11 @@ void FileProcessor::run()
// This is some random cell that ultimately won't get used, but it contains a buffer
// into which we can write data.
Cell *cell = m_cellMgr.get(VoxelKey());
#ifdef _MSC_VER
f.setCallback([this, &CountIncrement, &count, &limit, &cell](pdal::PointRef& point)
#else
f.setCallback([this, &count, &limit, &cell](pdal::PointRef& point)
#endif
{
// Write the data into the point buffer in the cell. This is the *last*
// cell buffer that we used. We're hoping that it's the right one.
@@ -30,6 +30,11 @@

#include "MapFile.hpp"

#ifdef _MSC_VER
#include <io.h>
#include <fcntl.h>
#endif

namespace untwine
{

@@ -66,6 +66,10 @@ def setupenv():
# any of the QGIS modules or else it will error.
setupenv()

if sys.version_info[0] > 3 or (sys.version_info[0] == 3 and sys.version_info[1] >= 9):
for p in os.getenv("PATH").split(";"):
if os.path.exists(p):
os.add_dll_directory(p)

from qgis.PyQt import QtCore

@@ -452,6 +452,9 @@ target_compile_features(qgis_analysis PRIVATE cxx_std_17)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_definitions(qgis_analysis PUBLIC _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
endif()
if (MSVC)
target_compile_definitions(qgis_analysis PUBLIC _HAS_AUTO_PTR_ETC=1)
endif()

target_include_directories(qgis_analysis PUBLIC
${CMAKE_SOURCE_DIR}/src/analysis
@@ -420,9 +420,10 @@ if(HAVE_OPENCL)
endif()

if (HAVE_PDAL)
include_directories(SYSTEM
${PDAL_INCLUDE_DIR}
)
include_directories(SYSTEM ${PDAL_INCLUDE_DIR})
if(MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
endif()

if(ENABLE_MODELTEST)
@@ -603,9 +604,7 @@ if (POSTGRES_FOUND)
endif()

if (HAVE_PDAL)
target_link_libraries(qgis_app
${PDAL_LIBRARIES}
)
target_link_libraries(qgis_app ${PDAL_LIBRARIES})
endif()

if(MSVC)
@@ -484,7 +484,7 @@ extern "C"
#ifndef Q_OS_WIN
#include <dlfcn.h>
#else
#include <windows.h>
#include <shellapi.h>
#include <dbghelp.h>
#endif

@@ -1644,9 +1644,7 @@ endif()
protobuf_generate_cpp(VECTOR_TILE_PROTO_SRCS VECTOR_TILE_PROTO_HDRS vectortile/vector_tile.proto)
set(QGIS_CORE_SRCS ${QGIS_CORE_SRCS} ${VECTOR_TILE_PROTO_SRCS})
set(QGIS_CORE_HDRS ${QGIS_CORE_HDRS} ${VECTOR_TILE_PROTO_HDRS})
if (MSVC)
set_source_files_properties(${VECTOR_TILE_PROTO_SRCS} vectortile/qgsvectortilemvtdecoder.cpp vectortile/qgsvectortilemvtencoder.cpp vectortile/qgsvectortilewriter.cpp PROPERTIES COMPILE_DEFINITIONS PROTOBUF_USE_DLLS)
else()
if (NOT MSVC)
# automatically generated file produces warnings (unused-parameter, unused-variable, misleading-indentation)
set_source_files_properties(${VECTOR_TILE_PROTO_SRCS} PROPERTIES COMPILE_FLAGS -w)
endif()
@@ -757,7 +757,7 @@ class CORE_EXPORT QgsAuthManager : public QObject
static QgsAuthManager *instance() SIP_SKIP;


#ifdef __MINGW32__
#ifdef Q_OS_WIN
public:
explicit QgsAuthManager() SIP_SKIP;
#else
@@ -983,10 +983,10 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
friend class TestQgsCoordinateReferenceSystem;
friend class QgsPostgresProvider;
friend class QgsCoordinateReferenceSystemRegistry;
friend bool operator> ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );
friend bool operator< ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );
friend bool operator>= ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );
friend bool operator<= ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );
friend bool CORE_EXPORT operator> ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );
friend bool CORE_EXPORT operator< ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );
friend bool CORE_EXPORT operator>= ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );
friend bool CORE_EXPORT operator<= ( const QgsCoordinateReferenceSystem &c1, const QgsCoordinateReferenceSystem &c2 );

bool createFromPostgisSrid( const long id );
};
@@ -1,6 +1,9 @@
########################################################
# Files

if(MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif(MSVC)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

0 comments on commit c5ea4b2

Please sign in to comment.