Skip to content
Commits on Source (28)
To cite PROJ in publications use:
PROJ contributors (2018). PROJ coordinate transformation software
PROJ contributors (2019). PROJ coordinate transformation software
library. Open Source Geospatial Foundation. URL https://proj4.org/.
A BibTeX entry for LaTeX users is
......@@ -9,6 +9,6 @@ A BibTeX entry for LaTeX users is
title = {{PROJ} coordinate transformation software library},
author = {{PROJ contributors}},
organization = {Open Source Geospatial Foundation},
year = {2018},
year = {2019},
url = {https://proj4.org/},
}
......@@ -9,7 +9,7 @@
#################################################################################
# General settings
#################################################################################
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# For historic reasons, the CMake PROJECT-NAME is PROJ4
project(PROJ4 LANGUAGES C CXX)
......@@ -19,19 +19,28 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.1)
cmake_policy(SET CMP0054 NEW)
endif ()
add_definitions(-DPROJ_COMPILATION=1)
# Set C++ version
# Make CMAKE_CXX_STANDARD available as cache option overridable by user
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard version to use (default is 11)")
message(STATUS "Requiring C++${CMAKE_CXX_STANDARD}")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS "Requiring C++${CMAKE_CXX_STANDARD} - done")
# Set warnings
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
# Suppress warning 4706 about assignment within conditional expression
# Suppress warning 4996 about sprintf, etc., being unsafe
# Suppress warning 4589 about Constructor of abstract class...ignores initializer for virtual base class (see https://github.com/weidai11/cryptopp/issues/214#issuecomment-230283061)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /wd4706 /wd4996 /D_CRT_SECURE_NO_WARNINGS")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W4 /wd4706 /wd4996 /wd4589 /D_CRT_SECURE_NO_WARNINGS")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W4 /wd4706 /wd4996 /D_CRT_SECURE_NO_WARNINGS")
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Wformat-security")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-declarations -Wformat -Wformat-security")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Wformat-security")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-declarations -Wformat -Wformat-security")
elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Wformat-security -Wfloat-conversion -Wc99-extensions -Wc11-extensions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-declarations -Wformat -Wformat-security -Wfloat-conversion")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Wformat-security -Wfloat-conversion -Wc99-extensions -Wc11-extensions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wextra -Wswitch -Wshadow -Wunused-parameter -Wmissing-declarations -Wformat -Wformat-security -Wfloat-conversion")
endif()
# Tell Intel compiler to do arithmetic accurately. This is needed to
......@@ -41,10 +50,9 @@ endif()
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
if (MSVC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qstd=c++11")
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fp-model precise")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
endif ()
endif ()
......@@ -63,9 +71,9 @@ colormsg(_HIBLUE_ "Configuring PROJ:")
#PROJ version information
#################################################################################
include(ProjVersion)
proj_version(MAJOR 5 MINOR 2 PATCH 0)
set(PROJ_API_VERSION "14")
set(PROJ_BUILD_VERSION "14.0.2")
proj_version(MAJOR 6 MINOR 0 PATCH 0)
set(PROJ_API_VERSION "15")
set(PROJ_BUILD_VERSION "15.0.0")
#################################################################################
# Build features and variants
......@@ -75,6 +83,20 @@ include(ProjConfig)
include(ProjMac)
include(policies)
#################################################################################
# Check for sqlite3
#################################################################################
find_program(EXE_SQLITE3 sqlite3)
if (NOT EXE_SQLITE3)
MESSAGE (SEND_ERROR "sqlite3 binary not found!")
ENDIF (NOT EXE_SQLITE3)
FIND_PACKAGE(Sqlite3 REQUIRED)
IF (NOT SQLITE3_FOUND)
MESSAGE (SEND_ERROR "sqlite3 dependency not found!")
ENDIF (NOT SQLITE3_FOUND)
#################################################################################
# threading configuration
#################################################################################
......@@ -82,11 +104,6 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package (Threads)
include(CheckIncludeFiles)
include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
if (HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
add_definitions(-DHAVE_PTHREAD_MUTEX_RECURSIVE=1)
endif()
include (CheckCSourceCompiles)
if (MSVC)
......@@ -112,6 +129,22 @@ else ()
add_definitions (-DHAVE_C99_MATH=0)
endif ()
if (Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
set (CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")
check_c_source_compiles("
#include <pthread.h>
int main(int argc, char* argv[]) {
(void)PTHREAD_MUTEX_RECURSIVE;
(void)argv;
return argc;
}
" HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
if (HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
add_definitions(-DHAVE_PTHREAD_MUTEX_RECURSIVE=1)
endif()
endif ()
boost_report_value(PROJ_PLATFORM_NAME)
boost_report_value(PROJ_COMPILER_NAME)
......@@ -160,9 +193,11 @@ set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}" CACHE PATH "The directory to install cm
include_directories(${PROJ4_SOURCE_DIR}/src)
message(STATUS "")
add_subdirectory(nad)
add_subdirectory(data)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(man)
add_subdirectory(cmake)
if(PROJ_TESTS)
add_subdirectory(test)
endif()
SUBDIRS = src man nad jniwrap cmake test
SUBDIRS = include src man data jniwrap cmake
DIST_SUBDIRS = include src man data jniwrap cmake test
EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt CITATION
EXTRA_DIST = CMakeLists.txt CITATION
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = proj.pc
......@@ -8,6 +9,9 @@ pkgconfig_DATA = proj.pc
AUTOMAKE_OPTIONS = dist-zip
ACLOCAL_AMFLAGS = -I m4
check-local:
cd test; $(MAKE) check
README: README.md
fgrep -v "[![" $< > $@
......
......@@ -96,7 +96,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
......@@ -191,7 +192,6 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/proj.pc.in AUTHORS \
COPYING ChangeLog INSTALL NEWS README compile config.guess \
config.sub depcomp install-sh ltmain.sh missing
......@@ -268,7 +268,10 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FLTO_FLAG = @FLTO_FLAG@
GREP = @GREP@
GTEST_CFLAGS = @GTEST_CFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_CXX11 = @HAVE_CXX11@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
......@@ -304,10 +307,14 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_CHECK = @SQLITE3_CHECK@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
THREAD_LIB = @THREAD_LIB@
VERSION = @VERSION@
......@@ -364,8 +371,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src man nad jniwrap cmake test
EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt CITATION
SUBDIRS = include src man data jniwrap cmake
DIST_SUBDIRS = include src man data jniwrap cmake test
EXTRA_DIST = CMakeLists.txt CITATION
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = proj.pc
AUTOMAKE_OPTIONS = dist-zip
......@@ -736,6 +744,7 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-recursive
all-am: Makefile $(DATA)
installdirs: installdirs-recursive
......@@ -843,13 +852,13 @@ ps-am:
uninstall-am: uninstall-pkgconfigDATA
.MAKE: $(am__recursive_targets) install-am install-strip
.MAKE: $(am__recursive_targets) check-am install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool clean-local cscope cscopelist-am ctags ctags-am \
dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
am--refresh check check-am check-local clean clean-cscope \
clean-generic clean-libtool clean-local cscope cscopelist-am \
ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \
dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
......@@ -865,6 +874,9 @@ uninstall-am: uninstall-pkgconfigDATA
.PRECIOUS: Makefile
check-local:
cd test; $(MAKE) check
README: README.md
fgrep -v "[![" $< > $@
......
6.0.0 Release Notes
-------------------
PROJ 6 has undergone extensive changes to increase its functional scope from a
cartographic projection engine with so-called "early-binding" geodetic datum
transformation capabilities to a more complete library supporting coordinate
transformations and coordinate reference systems.
As a foundation for other enhancements, PROJ now includes a C++ implementation
of the modelisation propopsed by the ISO-19111:2019 standard / OGC Abstract
Specification Topic 2: "Referencing By Coordinates", for geodetic reference
frames (datums), coordinate reference systems and coordinate operations.
Construction and query of those geodetic objects is available through a new C++
API, and also accessible for the most part from bindings in the C API.
Those geodetic objects can be imported and exported from and into the OGC
Well-Known Text format (WKT) in its different variants: ESRI WKT, GDAL WKT 1,
WKT2:2015 (ISO 19162:2015) and WKT2:2018 (ISO 19162:2018). Import and export of
CRS objects from and into PROJ strings is also supported. This functionality
was previously available in the GDAL software library (except WKT2 support
which is a new feature), and is now an integral part of PROJ.
A unified database of geodetic objects, coordinate reference systems and their
metadata, and coordinate operations between those CRS is now available in a
SQLite3 database file, proj.db. This includes definitions imported from the
IOGP EPSG dataset (v9.5.5 release), the IGNF (French national mapping agency)
geodetic registry and the ESRI projection engine database. PROJ is now the
reference software in the "OSGeo C stack" for this CRS and coordinate operation
database, whereas previously this functionality was spread over PROJ, GDAL and
libgeotiff, and used CSV or other adhoc text-based formats.
Late-binding coordinate operation capabilities, that takes metadata such as
area of use and accuracy into account, has been added. This can avoid in a
number of situations the past requirement of using WGS84 as a pivot system,
which could cause unneeded accuracy loss, or was not doable at all sometimes
when transformation to WGS84 was not available. Those late-binding capabilities
are now used by the proj_create_crs_to_crs() function and the cs2cs utility.
A new command line utility, projinfo, has been added to query information about
a geodetic object of the database, import and export geodetic objects from/into
WKT and PROJ strings, and display coordinate operations available between two
CRSs.
UPDATES
-------
o Removed projects.h as a public interface (#835)
o Deprecated the proj_api.h interface. The header file is still available
but will be removed with the next major version release of PROJ. It is
now required to define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H before the
interface can be used (#836)
o Removed support for the nmake build system (#838)
o Removed support for the proj_def.dat defaults file (#201)
o C++11 required for building PROJ (#1203)
o Added build dependency on SQLite 3.7 (#1175)
o Added projinfo command line application (#1189)
o Added many functions to proj.h for handling ISO19111 functionality (#1175)
o Added C++ API exposing ISO19111 functionality (#1175)
o Updated cs2cs to use late-binding features (#1182)
o Removed the nad2bin application. Now available in the proj-datumgrid
git repository (#1236)
o Removed support for Chebyshev polynomials in proj (#1226)
o Removed proj_geocentric_latitude from proj.h API (#1170)
o Changed behaviour of proj: Now only allow initialization of
projections (#1162)
o Changed behaviour of tmerc: Now default to the Extended Transverse
Mercator algorithm (etmerc). Old implementation available by adding
+approx (#404)
o Chaged behaviour: Default ellipsoid now set to GRS80 (was WGS84) (#1210)
o Allow multiple directories in PROJ_LIB environment variable (#1281)
o Added Lambert Conic Conformal (2SP Michigan) projection (#1142)
o Added Bertin1953 projection (#1133)
o Added Tobler-Mercator projection (#1153)
o Added Molodensky-Badekas transform (#1160)
o Added push and pop coordinate operations (#1250)
o Removed +t_obs parameter from helmert and deformation (#1264)
o Added +dt parameter to deformation as replacement for
removed +t_obs (#1264)
BUG FIXES
---------
o Read +towgs84 values correctly on locales not using dot as comma separator (#1136)
o Fixed file offset for reading of shift values in NTv1 files (#1144)
o Avoid problems with PTHREAD_MUTEX_RECURSIVE when using CMake (#1158)
o Avoid raising errors when setting ellipsoid flattening to zero (#1191)
o Fixed lower square calculations in rHealpix projection (#1206)
o Allow Molodensky transform parameters to be zero (#1194)
o Fixed wrong parameter in ITRF2000 init file (#1240)
o Fixed use of grid paths including spaces (#1152)
THANKS TO
------------
Version 6.0.0 is made possible by the following contributors:
Aaron Puchert
Phil Elson
Mateusz Łoskot
Markus Neteler
Jürgen Fischer
Howard Butler
Charles Karney
Alan D. Snow
Marco Bernasocchi
Karoline Skaar
Ben Boeckel
Ivan Veselov
Mike Taves
Philippe Rivière
Elliott Sales de Andrade
Kai Pastor
Kristian Evers
Even Rouault
5.2.0 Release Notes
-------------------
......
......@@ -11,7 +11,7 @@ https://proj4.org/
The PROJ.4 mailing list can be found at:
http://lists.maptools.org/mailman/listinfo/proj
https://lists.osgeo.org/mailman/listinfo/proj/
See the NEWS file for changes between versions.
......@@ -25,6 +25,11 @@ The following command line utilities are included in the PROJ package:
## Installation
### Build dependencies
PROJ requires C and C++11 compilers.
It also requires SQLite3 (headers, library and executable).
### Building with CMake
cd proj
......@@ -37,6 +42,11 @@ On Windows, one may need to specify generator:
cmake -G "Visual Studio 15 2017" ..
If the SQLite3 dependency is installed in a custom location, specify the
paths to the include directory and the library::
cmake -DSQLITE3_INCLUDE_DIR=/opt/SQLite/include -DSQLITE3_LIBRARY=/opt/SQLite/lib/libsqlite3.so ..
Tests are run with
ctest
......@@ -86,32 +96,6 @@ If you are building from the git repository you have to first run
which will generate a configure script that can be used as described above.
### Building on Windows with NMAKE
PROJ can be built with Microsoft Visual C/C++ using the `makefile.vc`
in the `PROJ` directory. First edit the `PROJ\nmake.opt` and
modify the `INSTDIR` value at the top to point to the directory
where the PROJ tree shall be installed.
If you want to install into `C:\PROJ`, it can remain unchanged.
Then use the `makefile.vc` to build the software e.g.:
C:\> cd proj
C:\PROJ> nmake /f makefile.vc
C:\PROJ> nmake /f makefile.vc install-all
Note that you have to have the VC++ environment variables, and path
setup properly. This may involve running the `VCVARS32.BAT`
script out of the Visual C++ tree.
The `makefile.vc` builds `proj.exe`, `proj.dll` and `proj.lib`.
On Windows you have to set the `PROJ_LIB` environment variable to make
sure that PROJ can find the resource files that it needs. For the
default install directory you can set `PROJ_LIB` with:
C:\> set PROJ_LIB=C:\PROJ\share
### Distribution files and format
Sources are distributed in one or more files. The principle elements
......
......@@ -1171,3 +1171,4 @@ m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([m4/pkg.m4])
# Find Sqlite3
# ~~~~~~~~~~~~
# Copyright (c) 2007, Martin Dobias <wonder.sk at gmail.com>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# CMake module to search for Sqlite3 library
#
# If it's found it sets SQLITE3_FOUND to TRUE
# and following variables are set:
# SQLITE3_INCLUDE_DIR
# SQLITE3_LIBRARY
# FIND_PATH and FIND_LIBRARY normally search standard locations
# before the specified paths. To search non-standard paths first,
# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
# and then again with no specified paths to search the default
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
# searching for the same item do nothing.
# try to use framework on mac
# want clean framework path, not unix compatibility path
IF (APPLE)
IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST"
OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY"
OR NOT CMAKE_FIND_FRAMEWORK)
SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
#FIND_PATH(SQLITE3_INCLUDE_DIR SQLite3/sqlite3.h)
FIND_LIBRARY(SQLITE3_LIBRARY SQLite3)
IF (SQLITE3_LIBRARY)
# FIND_PATH doesn't add "Headers" for a framework
SET (SQLITE3_INCLUDE_DIR ${SQLITE3_LIBRARY}/Headers CACHE PATH "Path to a file.")
ENDIF (SQLITE3_LIBRARY)
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
ENDIF ()
ENDIF (APPLE)
FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
"$ENV{LIB_DIR}/include"
"$ENV{LIB_DIR}/include/sqlite"
"$ENV{INCLUDE}"
)
FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3_i sqlite3 PATHS
"$ENV{LIB_DIR}/lib"
"$ENV{LIB}/lib"
)
IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
SET(SQLITE3_FOUND TRUE)
ENDIF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
IF (SQLITE3_FOUND)
IF (NOT SQLITE3_FIND_QUIETLY)
MESSAGE(STATUS "Found Sqlite3: ${SQLITE3_LIBRARY}")
ENDIF (NOT SQLITE3_FIND_QUIETLY)
ELSE (SQLITE3_FOUND)
IF (SQLITE3_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Sqlite3")
ENDIF (SQLITE3_FIND_REQUIRED)
ENDIF (SQLITE3_FOUND)
......@@ -10,5 +10,6 @@ EXTRA_DIST = CMakeLists.txt \
policies.cmake \
proj_config.cmake.in \
project-config-version.cmake.in \
project-config.cmake.in
project-config.cmake.in \
FindSqlite3.cmake
......@@ -95,7 +95,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
......@@ -156,7 +157,10 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FLTO_FLAG = @FLTO_FLAG@
GREP = @GREP@
GTEST_CFLAGS = @GTEST_CFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_CXX11 = @HAVE_CXX11@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
......@@ -192,10 +196,14 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_CHECK = @SQLITE3_CHECK@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
THREAD_LIB = @THREAD_LIB@
VERSION = @VERSION@
......@@ -264,7 +272,8 @@ EXTRA_DIST = CMakeLists.txt \
policies.cmake \
proj_config.cmake.in \
project-config-version.cmake.in \
project-config.cmake.in
project-config.cmake.in \
FindSqlite3.cmake
all: all-am
......
......@@ -9,7 +9,7 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
set(TEST_OK 1)
if(ARGV2)
set(TEST_OK 0)
set(GRID_FULLNAME ${PROJECT_SOURCE_DIR}/nad/${ARGV2})
set(GRID_FULLNAME ${PROJECT_SOURCE_DIR}/data/${ARGV2})
if(EXISTS ${GRID_FULLNAME})
set(TEST_OK 1)
endif(EXISTS ${GRID_FULLNAME})
......@@ -22,8 +22,8 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
if(${TEST_OK})
add_test( NAME "${testname}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/nad
COMMAND ${PROJECT_SOURCE_DIR}/nad/${SH_NAME}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/data
COMMAND ${PROJECT_SOURCE_DIR}/test/cli/${SH_NAME}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}}
)
endif(${TEST_OK})
......
......@@ -13,228 +13,10 @@
################################################################################
# Macros in this module:
#
# list_contains: Determine whether a string value is in a list.
#
# car: Return the first element in a list
#
# cdr: Return all but the first element in a list
#
# parse_arguments: Parse keyword arguments for use in other macros.
#
# proj_report_directory_property
#
# proj_target_output_name:
#
################################################################################
# This utility macro determines whether a particular string value
# occurs within a list of strings:
#
# list_contains(result string_to_find arg1 arg2 arg3 ... argn)
#
# This macro sets the variable named by result equal to TRUE if
# string_to_find is found anywhere in the following arguments.
macro(list_contains var value)
set(${var})
foreach (value2 ${ARGN})
if (${value} STREQUAL ${value2})
set(${var} TRUE)
endif (${value} STREQUAL ${value2})
endforeach (value2)
endmacro(list_contains)
# This utility macro extracts the first argument from the list of
# arguments given, and places it into the variable named var.
#
# car(var arg1 arg2 ...)
macro(car var)
set(${var} ${ARGV1})
endmacro(car)
# This utility macro extracts all of the arguments given except the
# first, and places them into the variable named var.
#
# car(var arg1 arg2 ...)
macro(cdr var junk)
set(${var} ${ARGN})
endmacro(cdr)
# The parse_arguments macro will take the arguments of another macro and
# define several variables. The first argument to parse_arguments is a
# prefix to put on all variables it creates. The second argument is a
# list of names, and the third argument is a list of options. Both of
# these lists should be quoted. The rest of parse_arguments are
# arguments from another macro to be parsed.
#
# parse_arguments(prefix arg_names options arg1 arg2...)
#
# For each item in options, parse_arguments will create a variable with
# that name, prefixed with prefix_. So, for example, if prefix is
# MY_MACRO and options is OPTION1;OPTION2, then parse_arguments will
# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These
# variables will be set to true if the option exists in the command line
# or false otherwise.
#
# For each item in arg_names, parse_arguments will create a variable
# with that name, prefixed with prefix_. Each variable will be filled
# with the arguments that occur after the given arg_name is encountered
# up to the next arg_name or the end of the arguments. All options are
# removed from these lists. parse_arguments also creates a
# prefix_DEFAULT_ARGS variable containing the list of all arguments up
# to the first arg_name encountered.
macro(parse_arguments prefix arg_names option_names)
set(DEFAULT_ARGS)
foreach(arg_name ${arg_names})
set(${prefix}_${arg_name})
endforeach(arg_name)
foreach(option ${option_names})
set(${prefix}_${option} FALSE)
endforeach(option)
set(current_arg_name DEFAULT_ARGS)
set(current_arg_list)
foreach(arg ${ARGN})
list_contains(is_arg_name ${arg} ${arg_names})
if (is_arg_name)
set(${prefix}_${current_arg_name} ${current_arg_list})
set(current_arg_name ${arg})
set(current_arg_list)
else (is_arg_name)
list_contains(is_option ${arg} ${option_names})
if (is_option)
set(${prefix}_${arg} TRUE)
else (is_option)
set(current_arg_list ${current_arg_list} ${arg})
endif (is_option)
endif (is_arg_name)
endforeach(arg)
set(${prefix}_${current_arg_name} ${current_arg_list})
endmacro(parse_arguments)
# Perform a reverse topological sort on the given LIST.
#
# topological_sort(my_list "MY_" "_EDGES")
#
# LIST is the name of a variable containing a list of elements to be
# sorted in reverse topological order. Each element in the list has a
# set of outgoing edges (for example, those other list elements that
# it depends on). In the resulting reverse topological ordering
# (written back into the variable named LIST), an element will come
# later in the list than any of the elements that can be reached by
# following its outgoing edges and the outgoing edges of any vertices
# they target, recursively. Thus, if the edges represent dependencies
# on build targets, for example, the reverse topological ordering is
# the order in which one would build those targets.
#
# For each element E in this list, the edges for E are contained in
# the variable named ${PREFIX}${E}${SUFFIX}, where E is the
# upper-cased version of the element in the list. If no such variable
# exists, then it is assumed that there are no edges. For example, if
# my_list contains a, b, and c, one could provide a dependency graph
# using the following variables:
#
# MY_A_EDGES b
# MY_B_EDGES
# MY_C_EDGES a b
#
# With the involcation of topological_sort shown above and these
# variables, the resulting reverse topological ordering will be b, a,
# c.
function(topological_sort LIST PREFIX SUFFIX)
# Clear the stack and output variable
set(VERTICES "${${LIST}}")
set(STACK)
set(${LIST})
# Loop over all of the vertices, starting the topological sort from
# each one.
foreach(VERTEX ${VERTICES})
string(TOUPPER ${VERTEX} UPPER_VERTEX)
# If we haven't already processed this vertex, start a depth-first
# search from where.
if (NOT FOUND_${UPPER_VERTEX})
# Push this vertex onto the stack with all of its outgoing edges
string(REPLACE ";" " " NEW_ELEMENT
"${VERTEX};${${PREFIX}${UPPER_VERTEX}${SUFFIX}}")
list(APPEND STACK ${NEW_ELEMENT})
# We've now seen this vertex
set(FOUND_${UPPER_VERTEX} TRUE)
# While the depth-first search stack is not empty
list(LENGTH STACK STACK_LENGTH)
while(STACK_LENGTH GREATER 0)
# Remove the vertex and its remaining out-edges from the top
# of the stack
list(GET STACK -1 OUT_EDGES)
list(REMOVE_AT STACK -1)
# Get the source vertex and the list of out-edges
separate_arguments(OUT_EDGES)
list(GET OUT_EDGES 0 SOURCE)
list(REMOVE_AT OUT_EDGES 0)
# While there are still out-edges remaining
list(LENGTH OUT_EDGES OUT_DEGREE)
while (OUT_DEGREE GREATER 0)
# Pull off the first outgoing edge
list(GET OUT_EDGES 0 TARGET)
list(REMOVE_AT OUT_EDGES 0)
string(TOUPPER ${TARGET} UPPER_TARGET)
if (NOT FOUND_${UPPER_TARGET})
# We have not seen the target before, so we will traverse
# its outgoing edges before coming back to our
# source. This is the key to the depth-first traversal.
# We've now seen this vertex
set(FOUND_${UPPER_TARGET} TRUE)
# Push the remaining edges for the current vertex onto the
# stack
string(REPLACE ";" " " NEW_ELEMENT
"${SOURCE};${OUT_EDGES}")
list(APPEND STACK ${NEW_ELEMENT})
# Setup the new source and outgoing edges
set(SOURCE ${TARGET})
string(TOUPPER ${SOURCE} UPPER_SOURCE)
set(OUT_EDGES
${${PREFIX}${UPPER_SOURCE}${SUFFIX}})
endif(NOT FOUND_${UPPER_TARGET})
list(LENGTH OUT_EDGES OUT_DEGREE)
endwhile (OUT_DEGREE GREATER 0)
# We have finished all of the outgoing edges for
# SOURCE; add it to the resulting list.
list(APPEND ${LIST} ${SOURCE})
# Check the length of the stack
list(LENGTH STACK STACK_LENGTH)
endwhile(STACK_LENGTH GREATER 0)
endif (NOT FOUND_${UPPER_VERTEX})
endforeach(VERTEX)
set(${LIST} ${${LIST}} PARENT_SCOPE)
endfunction(topological_sort)
# Small little hack that tweaks a component name (as used for CPack)
# to make sure to avoid certain names that cause problems. Sets the
# variable named varname to the "sanitized" name.
#
# FIXME: This is a complete hack. We probably need to fix the CPack
# generators (NSIS in particular) to get rid of the need for this.
macro(fix_cpack_component_name varname name)
if (${name} STREQUAL "foreach")
set(${varname} "boost_foreach")
else()
set(${varname} ${name})
endif()
endmacro()
#
# A big shout out to the cmake gurus @ compiz
#
......@@ -305,77 +87,6 @@ function(boost_report_value NAME)
colormsg("${NAME}${varpadding} = ${${NAME}}")
endfunction()
function(trace NAME)
if(BOOST_CMAKE_TRACE)
string(LENGTH "${NAME}" varlen)
math(EXPR padding_len 40-${varlen})
string(SUBSTRING "........................................"
0 ${padding_len} varpadding)
message("${NAME} ${varpadding} ${${NAME}}")
endif()
endfunction()
#
# pretty-prints the value of a variable so that the
# equals signs align
#
function(boost_report_pretty PRETTYNAME VARNAME)
string(LENGTH "${PRETTYNAME}" varlen)
math(EXPR padding_len 30-${varlen})
string(SUBSTRING " "
0 ${padding_len} varpadding)
message(STATUS "${PRETTYNAME}${varpadding} = ${${VARNAME}}")
endfunction()
#
# assert that ARG is actually a library target
#
macro(dependency_check ARG)
trace(ARG)
if (NOT "${ARG}" STREQUAL "")
get_target_property(deptype ${ARG} TYPE)
if(NOT deptype MATCHES ".*_LIBRARY$")
set(DEPENDENCY_OKAY FALSE)
list(APPEND DEPENDENCY_FAILURES ${ARG})
endif()
endif()
endmacro()
#
# Pretty-print of given property of current directory.
#
macro(proj_report_directory_property PROPNAME)
get_directory_property(${PROPNAME} ${PROPNAME})
boost_report_value(${PROPNAME})
endmacro()
#
# Scans the current directory and returns a list of subdirectories.
# Author: Robert Fleming
# Source: https://www.cmake.org/pipermail/cmake/2008-February/020114.html
#
# Third parameter is 1 if you want relative paths returned.
# Usage: list_subdirectories(the_list_is_returned_here /path/to/project TRUE)
#
macro(list_subdirectories retval curdir return_relative)
file(GLOB sub-dir RELATIVE ${curdir} *)
set(list_of_dirs "")
foreach(dir ${sub-dir})
if(IS_DIRECTORY ${curdir}/${dir})
if (${return_relative})
set(list_of_dirs ${list_of_dirs} ${dir})
else()
set(list_of_dirs ${list_of_dirs} ${curdir}/${dir})
endif()
endif()
endforeach()
set(${retval} ${list_of_dirs})
endmacro()
#
# Generates output name for given target depending on platform and version.
# For instance, on Windows, libraries get ABI version suffix proj_X_Y.{dll|lib}.
......@@ -401,56 +112,3 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME)
set(${OUTPUT_NAME} ${TARGET_NAME}${SUFFIX} PARENT_SCOPE)
endfunction()
\ No newline at end of file
#
# conversion from lla name to lla convert name ( without lla extension)
#
function(proj_lla_output_name LLA_INPUT_NAME LLA_OUTPUT_NAME )
get_filename_component(filename ${LLA_INPUT_NAME} NAME_WE)
get_filename_component(pathname ${LLA_INPUT_NAME} PATH)
set(${LLA_OUTPUT_NAME} ${pathname}/${filename} PARENT_SCOPE)
set(${LLA_OUTPUT_NAME} ${pathname}/${filename} PARENT_SCOPE)
endfunction()
function(proj_lla_target_name LLA_INPUT_NAME LLA_TARGET )
get_filename_component(filename ${LLA_INPUT_NAME} NAME_WE)
set(${LLA_TARGET} ${filename} PARENT_SCOPE)
endfunction()
#
# in place conversion of lla file to gsb
#
function(proj_convert_grid_lla2gsb GRID_DIRECTORY)
set(NAD2BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(NAD2BIN_PATH ${NAD2BIN_DIR}/nad2bin${CMAKE_EXECUTABLE_SUFFIX})
file(TO_NATIVE_PATH ${NAD2BIN_PATH} NAD2BIN_EXE)
file(GLOB LLA_FILES ${${GRID_DIRECTORY}}/*.lla)
foreach(LLA ${LLA_FILES} )
proj_lla_output_name(${LLA} DEST_FILE)
file(TO_NATIVE_PATH ${DEST_FILE} DEST)
proj_lla_target_name(${LLA} LLA_TARGET)
if(NOT EXISTS ${DEST})
add_custom_target( ${LLA_TARGET} ALL
COMMAND ${NAD2BIN_EXE} ${DEST} "<" ${LLA}
DEPENDS nad2bin )
endif(NOT EXISTS ${DEST})
endforeach(LLA)
endfunction()
#
# add lla output list to an existing file list
#
function(proj_append_lla_output_file LLA_INPUT_FILE FILE_LIST)
set(LIST_OUT ${${FILE_LIST}})
foreach(LLA ${${LLA_INPUT_FILE}} )
proj_lla_output_name(${LLA} DEST_FILE)
file(TO_NATIVE_PATH ${DEST_FILE} DEST)
set(LIST_OUT ${LIST_OUT} ${DEST_FILE} )
endforeach(LLA ${LLA_INPUT_FILE})
set(${FILE_LIST} ${LIST_OUT} PARENT_SCOPE)
endfunction()
......@@ -17,8 +17,12 @@
# MAJOR.MINOR version is used to set SOVERSION
#
include(CMakeParseArguments)
macro(proj_version)
parse_arguments(THIS_VERSION "MAJOR;MINOR;PATCH;"
cmake_parse_arguments(THIS_VERSION
""
"MAJOR;MINOR;PATCH"
""
${ARGN})
......
......@@ -20,7 +20,7 @@ set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@")
set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@")
set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@")
set (@PROJECT_NAME@_LIBRARIES proj)
set (@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::proj)
# Read in the exported definition of the library
include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake")
include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake")
......
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([PROJ], [5.2.0],
AC_INIT([PROJ], [6.0.0],
[https://github.com/OSGeo/proj.4/issues], proj, [https://proj4.org])
AC_CONFIG_MACRO_DIR([m4])
AC_LANG(C)
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([subdir-objects])
AM_CONFIG_HEADER(src/proj_config.h)
dnl Checks for programs.
......@@ -126,6 +126,11 @@ fi
dnl Clang enables -Woverloaded-virtual if -Wall is defined, but not GCC
AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual], [CXX_WFLAGS="$CXX_WFLAGS -Woverloaded-virtual"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Wweak-vtables], [CXX_WFLAGS="$CXX_WFLAGS -Wweak-vtables"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Wdeprecated], [CXX_WFLAGS="$CXX_WFLAGS -Wdeprecated"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Wabstract-vbase-init], [CXX_WFLAGS="$CXX_WFLAGS -Wabstract-vbase-init"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Winconsistent-missing-destructor-override], [CXX_WFLAGS="$CXX_WFLAGS -Winconsistent-missing-destructor-override"],,[$ERROR_ON_UNKNOWN_OPTIONS])
dnl Forbid use of 'or', 'and', ... alias operators
AX_CHECK_COMPILE_FLAG([-fno-operator-names], [CXX_WFLAGS="$CXX_WFLAGS -fno-operator-names"],,[$ERROR_ON_UNKNOWN_OPTIONS])
......@@ -138,10 +143,47 @@ fi
AC_LANG_POP([C++])
dnl ---------------------------------------------------------------------------
dnl Check for --enable-lto
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING([to enable LTO (link time optimization) build])
AC_ARG_ENABLE(lto,
AS_HELP_STRING([--enable-lto],
[enable LTO(link time optimization) (disabled by default)]))
FLTO_FLAG=""
if test "x$enable_lto" = "xyes"; then
AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-flto], [FLTO_FLAG="-flto"],,[$ERROR_ON_UNKNOWN_OPTIONS])
if test "$FLTO_FLAG" != ""; then
SAVED_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $FLTO_FLAG -Werror"
AC_MSG_CHECKING([if -flto is available at link time])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[]])],
[AC_MSG_RESULT([yes])],
[FLTO_FLAG=""]
[AC_MSG_RESULT([no])])
CXXFLAGS="$SAVED_CXXFLAGS"
fi
AC_LANG_POP([C++])
AX_CHECK_COMPILE_FLAG([-Wodr], [CXX_WFLAGS="$CXX_WFLAGS -Wodr"],,[$ERROR_ON_UNKNOWN_OPTIONS])
else
AC_MSG_RESULT([no])
fi
AC_SUBST(FLTO_FLAG,$FLTO_FLAG)
dnl Result in better inlining, but larger file
dnl AX_CHECK_COMPILE_FLAG([-fno-semantic-interposition], [CFLAGS="$CFLAGS -fno-semantic-interposition" CXXFLAGS="$CXXFLAGS -fno-semantic-interposition"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AC_SUBST(C_WFLAGS,$C_WFLAGS)
AC_SUBST(CXX_WFLAGS,$CXX_WFLAGS)
AC_SUBST(NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG,$NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG)
CFLAGS="${CFLAGS} -fvisibility=hidden"
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
dnl Checks for libraries.
save_CFLAGS="$CFLAGS"
......@@ -263,16 +305,54 @@ fi
AC_SUBST(MUTEX_SETTING,$MUTEX_SETTING)
AC_SUBST(THREAD_LIB,$THREAD_LIB)
AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile
test/Makefile test/gie/Makefile test/gigs/Makefile test/unit/Makefile
test/googletest/Makefile test/googletest/include/Makefile
dnl ---------------------------------------------------------------------------
dnl Check for sqlite3 library and binary
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.7])
AC_SUBST(SQLITE3_CFLAGS,$SQLITE3_CFLAGS)
AC_SUBST(SQLITE3_LIBS,$SQLITE3_LIBS)
AC_CHECK_PROG(SQLITE3_CHECK,sqlite3,yes)
if test x"$SQLITE3_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install sqlite3 binary.])
fi
dnl ---------------------------------------------------------------------------
dnl Check for external Google Test
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(external-gtest,
AS_HELP_STRING([--with-external-gtest],
[Whether to use external Google Test]),,)
if test "x$with_external_gtest" == "xyes" ; then
AC_MSG_RESULT([using external GTest.])
PKG_CHECK_MODULES([GTEST], [gtest >= 1.8.0])
else
AC_MSG_RESULT([using internal GTest.])
GTEST_CFLAGS="-I\$(top_srcdir)/test/googletest/include"
GTEST_LIBS="\$(top_builddir)/test/googletest/libgtest.la"
fi
AM_CONDITIONAL(USE_EXTERNAL_GTEST, [test "x$with_external_gtest" == "xyes"])
AC_SUBST(GTEST_CFLAGS,$GTEST_CFLAGS)
AC_SUBST(GTEST_LIBS,$GTEST_LIBS)
dnl ---------------------------------------------------------------------------
dnl Generate files
dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile include/Makefile include/proj/Makefile include/proj/internal/Makefile
test/Makefile test/cli/Makefile test/gie/Makefile test/gigs/Makefile test/unit/Makefile
man/Makefile man/man1/Makefile man/man3/Makefile data/Makefile
jniwrap/Makefile jniwrap/org.osgeo.proj/Makefile jniwrap/org.osgeo.proj/org/Makefile jniwrap/org.osgeo.proj/org/proj4/Makefile])
if ! test "x$with_external_gtest" = "xyes" ; then
AC_CONFIG_FILES([test/googletest/Makefile test/googletest/include/Makefile
test/googletest/include/gtest/Makefile
test/googletest/include/gtest/internal/Makefile
test/googletest/include/gtest/internal/custom/Makefile
test/googletest/src/Makefile
man/Makefile man/man1/Makefile man/man3/Makefile nad/Makefile
jniwrap/Makefile jniwrap/org.osgeo.proj/Makefile jniwrap/org.osgeo.proj/org/Makefile jniwrap/org.osgeo.proj/org/proj4/Makefile])
AC_CONFIG_FILES([nad/install], [chmod +x nad/install])
test/googletest/src/Makefile])
fi
AC_CONFIG_FILES([proj.pc])
......
......@@ -2,17 +2,13 @@
# files containing dictionary of useful projection
#
set(PROJ_DICTIONARY epsg
esri
set(PROJ_DICTIONARY null
world
esri.extra
other.extra
IGNF
nad27
GL27
nad83
nad.lst
proj_def.dat
CH
ITRF2000
ITRF2008
......@@ -25,39 +21,45 @@ set(PROJ_DICTIONARY epsg
file(GLOB GSB_FILES *.gsb)
file(GLOB GTX_FILES *.gtx)
set(GRIDSHIFT_FILES ${GSB_FILES} ${GTX_FILES})
set(GRIDSHIFT_FILES ${GRIDSHIFT_FILES}
set(ALL_SQL_IN "${CMAKE_CURRENT_BINARY_DIR}/all.sql.in")
set(PROJ_DB "${CMAKE_CURRENT_BINARY_DIR}/proj.db")
include(sql_filelist.cmake)
add_custom_command(OUTPUT ${ALL_SQL_IN}
COMMAND ${CMAKE_COMMAND} "-DALL_SQL_IN=${ALL_SQL_IN}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/generate_all_sql_in.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${SQL_FILES}
COMMENT "Generating all.sql.in"
VERBATIM
)
add_custom_target(generate_all_sql_in ALL DEPENDS ${ALL_SQL_IN})
add_custom_command(OUTPUT ${PROJ_DB}
COMMAND ${CMAKE_COMMAND} -E remove -f ${PROJ_DB}
COMMAND ${EXE_SQLITE3} -init ${ALL_SQL_IN} ${PROJ_DB} .quit
# note: we didn't port yet the foreign_key_check done in Makefile.am
DEPENDS generate_all_sql_in ${ALL_SQL_IN}
COMMENT "Generating proj.db"
VERBATIM
)
option(CONVERT_DATA "convert some ascii file to binary file for use in proj4" OFF)
if(CONVERT_DATA)
if (BUILD_NAD2BIN)
set(LLA_GRID_DIR ${CMAKE_CURRENT_SOURCE_DIR})
proj_convert_grid_lla2gsb(LLA_GRID_DIR)
file(GLOB LLA_FILES *.lla)
proj_append_lla_output_file(LLA_FILES GRIDSHIFT_FILES)
else()
message(ERROR " you need to compile nad2bin exe in order to convert data file" )
endif(BUILD_NAD2BIN)
endif(CONVERT_DATA)
add_custom_target(generate_proj_db ALL DEPENDS ${PROJ_DB})
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
foreach(FILE ${PROJ_DICTIONARY}
${GRIDSHIFT_FILES})
configure_file(${FILE} ${FILE} COPYONLY)
endforeach()
endif()
#
#install
#
set(ALL_DATA_FILE ${PROJ_DICTIONARY}
${GRIDSHIFT_FILES}
${GEOID_FILES})
${PROJ_DB})
install(FILES ${ALL_DATA_FILE}
DESTINATION ${DATADIR})
#
# test
#
set(CS2CS_BIN "cs2cs")
set(PROJ_BIN "proj")
proj_add_test_script_sh("test27" PROJ_BIN )
proj_add_test_script_sh("test83" PROJ_BIN )
proj_add_test_script_sh("testvarious" CS2CS_BIN )
proj_add_test_script_sh("testdatumfile" CS2CS_BIN "connu")
proj_add_test_script_sh("testIGNF" CS2CS_BIN "ntf_r93.gsb")
proj_add_test_script_sh("testntv2" CS2CS_BIN "ntv2_0.gsb")
......@@ -3,7 +3,7 @@
# ITRF2000 -> ITRF2005 is only defined the opposite way, so we flip the sign on all
# parameters to get the opposite transformation. Parameters from http://itrf.ign.fr/ITRF_solutions/2005/tp_05-00.php
<ITRF2005> +proj=helmert +x=-0.0001 +y=0.0008 +z=0.0058 +s=-0.0004 +dx=0.0002 +dy=-0.0001 +dz=0.0018 +ds=-0.000008 +t_epoch=2000.0 +convention=position_vector
<ITRF2005> +proj=helmert +x=-0.0001 +y=0.0008 +z=0.0058 +s=-0.0004 +dx=0.0002 +dy=-0.0001 +dz=0.0018 +ds=-0.00008 +t_epoch=2000.0 +convention=position_vector
<ITRF97> +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +convention=position_vector
......