Skip to content

Commit ade216d

Browse files
authoredApr 25, 2018
Merge pull request #6820 from PeterPetrik/QgsMeshLayer_1_mesh
[FEATURE] QgsMeshLayer part 1: Reading raw mesh
2 parents ae53f26 + 5b1918f commit ade216d

File tree

64 files changed

+2897
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2897
-12
lines changed
 

‎CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ IF(WITH_CORE)
9595
SET (HAVE_GUI TRUE) # used in qgsconfig.h
9696
ENDIF()
9797

98+
# try to configure and build MDAL support
99+
SET (WITH_INTERNAL_MDAL TRUE CACHE BOOL "Determines whether MDAL support should be built")
100+
IF (NOT WITH_INTERNAL_MDAL)
101+
SET (MDAL_PREFIX "" CACHE PATH "Path to MDAL base directory")
102+
ENDIF (NOT WITH_INTERNAL_MDAL)
103+
98104
# try to configure and build POSTGRESQL support
99105
SET (WITH_POSTGRESQL TRUE CACHE BOOL "Determines whether POSTGRESQL support should be built")
100106
IF (WITH_POSTGRESQL)
@@ -258,6 +264,10 @@ IF(WITH_CORE)
258264
FIND_PACKAGE(Postgres) # PostgreSQL provider
259265
ENDIF (WITH_POSTGRESQL)
260266

267+
IF (NOT WITH_INTERNAL_MDAL)
268+
FIND_PACKAGE(MDAL REQUIRED) # MDAL provider
269+
ENDIF (NOT WITH_INTERNAL_MDAL)
270+
261271
FIND_PACKAGE(SpatiaLite REQUIRED)
262272

263273
IF (NOT PROJ_FOUND OR NOT GEOS_FOUND OR NOT GDAL_FOUND)

‎cmake/FindMDAL.cmake

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Find MDAL
2+
# ~~~~~~~~~
3+
# Copyright (c) 2018, Peter Petrik <zilolv at gmail dot com>
4+
# Redistribution and use is allowed according to the terms of the BSD license.
5+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
6+
#
7+
#
8+
# Once run this will define:
9+
# MDAL_FOUND - System has MDAL
10+
# MDAL_INCLUDE_DIRS - The MDAL include directories
11+
# MDAL_LIBRARIES - The libraries needed to use MDAL
12+
# MDAL_DEFINITIONS - Compiler switches required for using MDAL
13+
14+
FIND_PACKAGE(PkgConfig)
15+
PKG_CHECK_MODULES(PC_MDAL QUIET libmdal)
16+
SET(MDAL_DEFINITIONS ${PC_MDAL_CFLAGS_OTHER})
17+
18+
FIND_PATH(MDAL_INCLUDE_DIR mdal.h
19+
HINTS ${PC_MDAL_INCLUDEDIR} ${PC_MDAL_INCLUDE_DIRS} ${MDAL_PREFIX}/include
20+
PATH_SUFFIXES libmdal )
21+
22+
FIND_LIBRARY(MDAL_LIBRARY NAMES mdal libmdal
23+
HINTS ${PC_MDAL_LIBDIR} ${PC_MDAL_LIBRARY_DIRS} ${MDAL_PREFIX}/lib)
24+
25+
INCLUDE(FindPackageHandleStandardArgs)
26+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MDAL DEFAULT_MSG
27+
MDAL_LIBRARY MDAL_INCLUDE_DIR)
28+
29+
MARK_AS_ADVANCED(MDAL_INCLUDE_DIR MDAL_LIBRARY )
30+
31+
SET(MDAL_LIBRARIES ${MDAL_LIBRARY} )
32+
SET(MDAL_INCLUDE_DIRS ${MDAL_INCLUDE_DIR} )

0 commit comments

Comments
 (0)
Please sign in to comment.