[proj] 01/03: Imported Upstream version 4.9.1~rc4
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Tue Feb 24 21:50:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch experimental
in repository proj.
commit 5746525310ae168c8929437b469d6fb8a2433fc1
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Tue Feb 24 22:40:48 2015 +0100
Imported Upstream version 4.9.1~rc4
---
AUTHORS | 4 +++
CMakeLists.txt | 10 +++++++-
NEWS | 5 ++++
cmake/CMakeLists.txt | 29 +++++++++++++++++++++
cmake/Makefile.am | 9 +++++--
cmake/Makefile.in | 8 ++++--
cmake/Proj4SystemInfo.cmake | 6 +++++
cmake/project-config-version.cmake.in | 48 +++++++++++++++++++++++++++++++++++
cmake/project-config.cmake.in | 28 ++++++++++++++++++++
nad/testvarious | 8 +++---
nad/tv_out.dist | 10 ++++----
src/CMakeLists.txt | 6 ++---
src/lib_proj.cmake | 10 ++++++--
13 files changed, 162 insertions(+), 19 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index da447ff..ea121aa 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,6 +3,7 @@ Gerald Evenden
Maintainer(s):
Frank Warmerdam <warmerdam at pobox.com>
+Howard Butler <howard at hobu.co>
Contributors:
Brent Fraser <bfraser at geoanalytic.com>
@@ -10,4 +11,7 @@ Chris Stuber <imap at chesapeake.net>
Craig Bruce <cbruce at cubewerx.com>
Victor Osipkov <vctos at email.com>
Andrea Antonello <andrea.antonello at hydrologis.com>
+Charles Karney <charles.karney at sri.com>
+Karsten Engsager
+Knud Poder
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 81a2e4d..f30b1a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,8 @@ colormsg(_HIBLUE_ "Configuring PROJ:")
#################################################################################
include(Proj4Version)
proj_version(MAJOR 4 MINOR 9 PATCH 1)
-set(PROJ_SOVERSION "9.0.0")
+set(PROJ_API_VERSION "9")
+set(PROJ_BUILD_VERSION "9.0.0")
#################################################################################
# Build features and variants
@@ -45,6 +46,12 @@ include(policies)
boost_report_value(PROJ_PLATFORM_NAME)
boost_report_value(PROJ_COMPILER_NAME)
+# Set a default build type for single-configuration cmake generators if
+# no build type is set.
+if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE Release)
+endif ()
+
option(PROJ4_TESTS "Enable build of collection of PROJ4 tests" ON)
boost_report_value(PROJ4_TESTS)
if(PROJ4_TESTS)
@@ -81,4 +88,5 @@ message(STATUS "")
add_subdirectory(nad)
add_subdirectory(src)
add_subdirectory(man)
+add_subdirectory(cmake)
diff --git a/NEWS b/NEWS
index b4fcb06..985a07f 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,10 @@
o Regenerate nad/epsg with GDAL r28536 to avoid precision loss in TOWGS84
parameters, e.g. on Amersfoort / RD EPSG:4289 (#260)
+ o Add CMake project-config.cmake scripts (#264 from Charles Karney)
+
+ o Dial back test sensitivity #255
+
4.9.0 Release Notes
-------------------
@@ -54,6 +58,7 @@
o Various bug fixes and cleanup.
+ o Added the CalCOFI pseudo-projection, #135
4.8.0 Release Notes
-------------------
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
new file mode 100644
index 0000000..dcb0a61
--- /dev/null
+++ b/cmake/CMakeLists.txt
@@ -0,0 +1,29 @@
+# proj-config.cmake for the install tree. It's installed in
+# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
+# path to the root from there. (Note that the whole install tree can
+# be relocated.)
+if (NOT WIN32)
+ set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_INTERN_NAME}")
+ set (PROJECT_ROOT_DIR "../../..")
+else ()
+ set (INSTALL_CMAKE_DIR "cmake")
+ set (PROJECT_ROOT_DIR "..")
+endif ()
+
+string(TOLOWER "${PROJECT_INTERN_NAME}" PROJECT_NAME_LOWER)
+configure_file (project-config.cmake.in project-config.cmake @ONLY)
+configure_file (project-config-version.cmake.in
+ project-config-version.cmake @ONLY)
+install (FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/project-config.cmake"
+ DESTINATION "${INSTALL_CMAKE_DIR}"
+ RENAME "${PROJECT_NAME_LOWER}-config.cmake")
+install (FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/project-config-version.cmake"
+ DESTINATION "${INSTALL_CMAKE_DIR}"
+ RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
+# Make information about the cmake targets (the library and the tools)
+# available.
+install (EXPORT targets
+ FILE ${PROJECT_NAME_LOWER}-targets.cmake
+ DESTINATION "${INSTALL_CMAKE_DIR}")
diff --git a/cmake/Makefile.am b/cmake/Makefile.am
index 8e03584..4cf5fc7 100644
--- a/cmake/Makefile.am
+++ b/cmake/Makefile.am
@@ -1,4 +1,5 @@
-EXTRA_DIST = Proj4InstallPath.cmake \
+EXTRA_DIST = CMakeLists.txt \
+ Proj4InstallPath.cmake \
Proj4SystemInfo.cmake \
Proj4Utilities.cmake \
proj_config.cmake.in \
@@ -6,4 +7,8 @@ EXTRA_DIST = Proj4InstallPath.cmake \
Proj4Mac.cmake \
Proj4Test.cmake \
Proj4Version.cmake \
- policies.cmake
+ policies.cmake \
+ proj_config.cmake.in \
+ project-config-version.cmake.in \
+ project-config.cmake.in
+
diff --git a/cmake/Makefile.in b/cmake/Makefile.in
index 2edd755..bd9b862 100644
--- a/cmake/Makefile.in
+++ b/cmake/Makefile.in
@@ -230,7 +230,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = Proj4InstallPath.cmake \
+EXTRA_DIST = CMakeLists.txt \
+ Proj4InstallPath.cmake \
Proj4SystemInfo.cmake \
Proj4Utilities.cmake \
proj_config.cmake.in \
@@ -238,7 +239,10 @@ EXTRA_DIST = Proj4InstallPath.cmake \
Proj4Mac.cmake \
Proj4Test.cmake \
Proj4Version.cmake \
- policies.cmake
+ policies.cmake \
+ proj_config.cmake.in \
+ project-config-version.cmake.in \
+ project-config.cmake.in
all: all-am
diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake
index 68c4227..294a50b 100644
--- a/cmake/Proj4SystemInfo.cmake
+++ b/cmake/Proj4SystemInfo.cmake
@@ -44,6 +44,12 @@ if(WIN32)
if(MSVC_VERSION EQUAL 1600)
set(PROJ_COMPILER_NAME "msvc-10.0") #Visual Studio 2010
endif()
+ if(MSVC_VERSION EQUAL 1700)
+ set(PROJ_COMPILER_NAME "msvc-11.0") #Visual Studio 2012
+ endif()
+ if(MSVC_VERSION EQUAL 1800)
+ set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013
+ endif()
endif(MSVC)
if(MINGW)
diff --git a/cmake/project-config-version.cmake.in b/cmake/project-config-version.cmake.in
new file mode 100644
index 0000000..5d57ee1
--- /dev/null
+++ b/cmake/project-config-version.cmake.in
@@ -0,0 +1,48 @@
+# Version checking for @PROJECT_INTERN_NAME@
+
+set (PACKAGE_VERSION "@PROJ_VERSION@")
+set (PACKAGE_VERSION_MAJOR "@PROJ_VERSION_MAJOR@")
+set (PACKAGE_VERSION_MINOR "@PROJ_VERSION_MINOR@")
+set (PACKAGE_VERSION_PATCH "@PROJ_VERSION_PATCH@")
+
+if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_INTERN_NAME@")
+ # Check package name (in particular, because of the way cmake finds
+ # package config files, the capitalization could easily be "wrong").
+ # This is necessary to ensure that the automatically generated
+ # variables, e.g., <package>_FOUND, are consistently spelled.
+ set (REASON "package = @PROJECT_INTERN_NAME@, NOT ${PACKAGE_FIND_NAME}")
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
+ CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@))
+ # Reject if there's a 32-bit/64-bit mismatch (not necessary with Apple
+ # since a multi-architecture library is built for that platform).
+ set (REASON "sizeof(*void) = @CMAKE_SIZEOF_VOID_P@")
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+elseif (MSVC AND NOT MSVC_VERSION STREQUAL "@MSVC_VERSION@")
+ # Reject if there's a mismatch in MSVC compiler versions
+ set (REASON "_MSC_VER = @MSVC_VERSION@")
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+elseif (NOT CMAKE_CROSSCOMPILING STREQUAL "@CMAKE_CROSSCOMPILING@")
+ # Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}
+ set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+elseif (CMAKE_CROSSCOMPILING AND
+ NOT (CMAKE_SYSTEM_NAME STREQUAL "@CMAKE_SYSTEM_NAME@" AND
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "@CMAKE_SYSTEM_PROCESSOR@"))
+ # Reject if cross-compiling and there's a mismatch in the target system
+ set (REASON "target = @CMAKE_SYSTEM_NAME at -@CMAKE_SYSTEM_PROCESSOR@")
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+elseif (PACKAGE_FIND_VERSION)
+ if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+ set (PACKAGE_VERSION_EXACT TRUE)
+ elseif (PACKAGE_FIND_VERSION VERSION_LESS PACKAGE_VERSION
+ AND PACKAGE_FIND_VERSION_MAJOR EQUAL PACKAGE_VERSION_MAJOR)
+ set (PACKAGE_VERSION_COMPATIBLE TRUE)
+ endif ()
+endif ()
+
+# If unsuitable, append the reason to the package version so that it's
+# visible to the user.
+if (PACKAGE_VERSION_UNSUITABLE)
+ set (PACKAGE_VERSION "${PACKAGE_VERSION} (${REASON})")
+endif ()
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
new file mode 100644
index 0000000..6110dc6
--- /dev/null
+++ b/cmake/project-config.cmake.in
@@ -0,0 +1,28 @@
+# Configure @PROJECT_INTERN_NAME@
+#
+# Set
+# @PROJECT_INTERN_NAME at _FOUND = 1
+# @PROJECT_INTERN_NAME at _INCLUDE_DIRS = /usr/local/include
+# @PROJECT_INTERN_NAME at _LIBRARIES = proj
+# @PROJECT_INTERN_NAME at _LIBRARY_DIRS = /usr/local/lib
+# @PROJECT_INTERN_NAME at _BINARY_DIRS = /usr/local/bin
+# @PROJECT_INTERN_NAME at _VERSION = 4.9.1 (for example)
+
+message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
+# @PROJECT_INTERN_NAME at _VERSION is set by version file
+message (STATUS
+ "@PROJECT_INTERN_NAME@ configuration, version ${@PROJECT_INTERN_NAME at _VERSION}")
+
+# Tell the user project where to find our headers and libraries
+get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
+set (@PROJECT_INTERN_NAME at _INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@")
+set (@PROJECT_INTERN_NAME at _LIBRARY_DIRS "${_ROOT}/@LIBDIR@")
+set (@PROJECT_INTERN_NAME at _BINARY_DIRS "${_ROOT}/@BINDIR@")
+
+set (@PROJECT_INTERN_NAME at _LIBRARIES proj)
+# Read in the exported definition of the library
+include ("${_DIR}/@PROJECT_NAME_LOWER at -targets.cmake")
+
+unset (_ROOT)
+unset (_DIR)
diff --git a/nad/testvarious b/nad/testvarious
index 08eb546..92cb6bd 100755
--- a/nad/testvarious
+++ b/nad/testvarious
@@ -589,7 +589,7 @@ EOF
echo "##############################################################" >> ${OUT}
echo "Test MGI datum gives expected results (#207)" >> ${OUT}
#
-$EXE -f '%.14f' \
+$EXE -f '%.9f' \
+proj=latlong +datum=WGS84 \
+to +init=epsg:31284 \
-E >>${OUT} <<EOF
@@ -598,7 +598,7 @@ EOF
echo "##############################################################" >> ${OUT}
echo "Test omerc sensitivity with locations 90d from origin(#114)" >> ${OUT}
#
-$EXE -f '%.14f' \
+$EXE -f '%.8f' \
+proj=latlong +ellps=WGS84 \
+to +proj=omerc +ellps=WGS84 +lon_1=62.581150 +lat_1=74.856102 \
+lon_2=53.942810 +lat_2=74.905884 +units=km +no_rot +no_defs \
@@ -685,7 +685,7 @@ EOF
echo "##############################################################" >> ${OUT}
echo "Test bug 245 (use +datum=carthage)" >> ${OUT}
#
-$EXE -f '%.12f' \
+$EXE -f '%.7f' \
+proj=longlat +datum=WGS84 +nodefs +to +proj=utm +zone=32 +datum=carthage +nodefs \
-E >>${OUT} <<EOF
10 34
@@ -693,7 +693,7 @@ EOF
echo "##############################################################" >> ${OUT}
echo "Test bug 245 (use expension of +datum=carthage)" >> ${OUT}
#
-$EXE -f '%.12f' \
+$EXE -f '%.7f' \
+proj=longlat +datum=WGS84 +nodefs +to +proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-263.0,6.0,431.0 +nodefs \
-E >>${OUT} <<EOF
10 34
diff --git a/nad/tv_out.dist b/nad/tv_out.dist
index a9d5120..b0226f4 100644
--- a/nad/tv_out.dist
+++ b/nad/tv_out.dist
@@ -291,11 +291,11 @@ Test inverse handling
10 20 -1384841.19 7581707.88 0.00
##############################################################
Test MGI datum gives expected results (#207)
-16.33 48.20 595710.37321015028283 5357598.46457545924932 -44.49510847218335
+16.33 48.20 595710.373210150 5357598.464575459 -44.495108472
##############################################################
Test omerc sensitivity with locations 90d from origin(#114)
-56.958381652832 72.8798 -9985.16336452572614 -227.67701050320997 0.00000000000000
-56.9584 72.8798 9985.16263662453457 -227.67701050313340 0.00000000000000
+56.958381652832 72.8798 -9985.16336453 -227.67701050 0.00000000
+56.9584 72.8798 9985.16263662 -227.67701050 0.00000000
##############################################################
Test omerc differences between poles (#190)
-27 70 7846957.203 0.000 0.000
@@ -326,7 +326,7 @@ Test bug 244 (2)
987122.4183302754536 -14429896.5395309105515 -140.100000000000 -87.000000000000 0.000000000000
##############################################################
Test bug 245 (use +datum=carthage)
-10 34 592302.981946153101 3762148.734061029274 -30.311017032713
+10 34 592302.9819462 3762148.7340610 -30.3110170
##############################################################
Test bug 245 (use expension of +datum=carthage)
-10 34 592302.981946153101 3762148.734061030205 -30.311017032713
+10 34 592302.9819462 3762148.7340610 -30.3110170
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 77d5d6f..7c84fab 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,14 +11,14 @@ option(BUILD_NAD2BIN "Build nad2bin (format conversion tool) " ON)
if(NOT MSVC)
if (NOT APPLE)
# Use relative path so that package is relocatable
- set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
+ set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${LIBDIR}")
else ()
- set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
# TO DO: cmake 2.8.12 introduces a way to make the install tree
# relocatable with OSX via
# (1) set(CMAKE_MACOSX_RPATH ON) and
# (2) setting the INSTALL_RPATH property on the executables to
- # "@loader_path/../lib"
+ # "@loader_path/../${LIBDIR}"
endif ()
endif ()
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index e0ed351..8111c7a 100644
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -264,17 +264,20 @@ add_library( ${PROJ_CORE_TARGET}
if(WIN32)
set_target_properties(${PROJ_CORE_TARGET}
PROPERTIES
+ VERSION "${${PROJECT_INTERN_NAME}_BUILD_VERSION}"
OUTPUT_NAME "${PROJ_CORE_TARGET_OUTPUT_NAME}"
CLEAN_DIRECT_OUTPUT 1)
elseif(BUILD_FRAMEWORKS_AND_BUNDLE)
set_target_properties(${PROJ_CORE_TARGET}
PROPERTIES
+ VERSION "${${PROJECT_INTERN_NAME}_BUILD_VERSION}"
INSTALL_NAME_DIR ${PROJ_INSTALL_NAME_DIR}
CLEAN_DIRECT_OUTPUT 1)
else()
set_target_properties(${PROJ_CORE_TARGET}
PROPERTIES
- SOVERSION "${${PROJECT_INTERN_NAME}_SOVERSION}"
+ VERSION "${${PROJECT_INTERN_NAME}_BUILD_VERSION}"
+ SOVERSION "${${PROJECT_INTERN_NAME}_API_VERSION}"
CLEAN_DIRECT_OUTPUT 1)
endif()
@@ -288,7 +291,9 @@ set_target_properties(${PROJ_CORE_TARGET}
set(PROJ_LIBRARIES ${PROJ_CORE_TARGET} )
if(UNIX AND BUILD_LIBPROJ_SHARED)
find_library(M_LIB m)
- TARGET_LINK_LIBRARIES(${PROJ_CORE_TARGET} ${M_LIB})
+ if(M_LIB)
+ TARGET_LINK_LIBRARIES(${PROJ_CORE_TARGET} -lm)
+ endif()
endif(UNIX AND BUILD_LIBPROJ_SHARED)
if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT AND BUILD_LIBPROJ_SHARED)
TARGET_LINK_LIBRARIES(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT})
@@ -299,6 +304,7 @@ endif(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT AND BUILD_LIBPROJ
# install
##############################################
install(TARGETS ${PROJ_CORE_TARGET}
+ EXPORT targets
RUNTIME DESTINATION ${BINDIR}
LIBRARY DESTINATION ${LIBDIR}
ARCHIVE DESTINATION ${LIBDIR}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/proj.git
More information about the Pkg-grass-devel
mailing list