Commit 1bf12b5b authored by Daniel Agar's avatar Daniel Agar

cmake add shapelib support

parent ec45b5f7
......@@ -137,8 +137,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-Wextra
-Werror
-frtti
-Wno-address-of-packed-member # ignore for mavlink
)
......@@ -152,8 +150,6 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-Wall
-Wextra
-Werror
-frtti
)
elseif (WIN32)
......@@ -175,6 +171,8 @@ include_directories(
libs/mavlink/include/mavlink/v2.0
libs/mavlink/include/mavlink/v2.0/ardupilotmega
libs/mavlink/include/mavlink/v2.0/common
libs/shapelib
)
add_subdirectory(libs)
......
add_subdirectory(qwt)
add_subdirectory(qtandroidserialport)
add_subdirectory(qwt)
add_subdirectory(shapelib)
......@@ -29,7 +29,15 @@ message(STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}")
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
# libraries are all shared by default.
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
cmake_policy(SET CMP0026 OLD) # Disallow use of the LOCATION property for build targets
add_compile_options(
-Wno-missing-braces
-Wno-sign-compare
-Wno-return-type
)
# Use rpath?
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
......@@ -148,7 +156,7 @@ set(executables
find_program(BASH_EXECUTABLE bash)
find_program(SED_EXECUTABLE sed)
if(BASH_EXECUTABLE AND SED_EXECUTABLE)
set(BUILD_TEST ON)
#set(BUILD_TEST ON)
else(BASH_EXECUTABLE AND SED_EXECUTABLE)
message(STATUS "WARNING: sed or bash not available so disabling testing")
endif(BASH_EXECUTABLE AND SED_EXECUTABLE)
......
......@@ -88,6 +88,8 @@ add_library(qgc
QGCTemporaryFile.cc
QGCToolbox.cc
RunGuard.cc
ShapeFileHelper.cc
SHPFileHelper.cc
TerrainTile.cc
UTM.cpp
......@@ -128,6 +130,7 @@ add_subdirectory(ViewWidgets)
target_link_libraries(qgc
PRIVATE
shp
PUBLIC
Qt5::QuickWidgets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment