Skip to content

Commit

Permalink
osgeo4w: vc16 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 1, 2021
1 parent b065d5e commit c5ea4b2
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion cmake/FindPDAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 2 additions & 18 deletions cmake/PyQtMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions external/untwine/epf/FileProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions external/untwine/untwine/MapFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@

#include "MapFile.hpp"

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

namespace untwine
{

Expand Down
4 changes: 4 additions & 0 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions src/analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ extern "C"
#ifndef Q_OS_WIN
#include <dlfcn.h>
#else
#include <windows.h>
#include <shellapi.h>
#include <dbghelp.h>
#endif

Expand Down
4 changes: 1 addition & 3 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/core/auth/qgsauthmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/core/qgscoordinatereferencesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
};
Expand Down
3 changes: 3 additions & 0 deletions src/providers/pdal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit c5ea4b2

Please sign in to comment.