Commit badbd352 authored by Brad King's avatar Brad King

Rename module vtklibproj4 to vtklibproj

Although hosted at `proj4.org`, the library is called `PROJ` and has
now released version 5.  Drop the version number from our module name.
parent 041101a1
# Find LIBPROJ4 library and header file
# Sets
# LIBPROJ4_FOUND to 0 or 1 depending on the result
# LIBPROJ4_INCLUDE_DIR to directories required for using libproj4
# LIBPROJ4_LIBRARIES to libproj4 and any dependent libraries
# If LIBPROJ4_REQUIRED is defined, then a fatal error message will be generated if libproj4 is not found
if ( NOT LIBPROJ4_INCLUDE_DIR OR NOT LIBPROJ4_LIBRARIES OR NOT LIBPROJ4_FOUND )
if ( $ENV{LIBPROJ4_DIR} )
file( TO_CMAKE_PATH "$ENV{LIBPROJ4_DIR}" _LIBPROJ4_DIR )
endif ()
set(LIBPROJ4_LIBRARY_SEARCH_PATHS
${_LIBPROJ4_DIR}
${_LIBPROJ4_DIR}/lib64
${_LIBPROJ4_DIR}/lib
)
find_library( LIBPROJ4_LIBRARY_RELEASE
NAMES proj
HINTS
${LIBPROJ4_LIBRARY_SEARCH_PATHS}
)
find_library( LIBPROJ4_LIBRARY_DEBUG
NAMES projd
PATHS
${LIBPROJ4_LIBRARY_SEARCH_PATHS}
)
find_path( LIBPROJ4_INCLUDE_DIR
NAMES proj_api.h
HINTS
${_LIBPROJ4_DIR}
${_LIBPROJ4_DIR}/include
)
include(SelectLibraryConfigurations)
select_library_configurations(LIBPROJ4)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBPROJ4
REQUIRED_VARS LIBPROJ4_LIBRARY LIBPROJ4_INCLUDE_DIR)
if(LIBPROJ4_FOUND)
set(LIBPROJ4_INCLUDE_DIRS ${LIBPROJ4_INCLUDE_DIR})
if(NOT LIBPROJ4_LIBRARIES)
set(LIBPROJ4_LIBRARIES ${LIBPROJ4_LIBRARY})
endif()
endif()
endif ()
mark_as_advanced(LIBPROJ4_INCLUDE_DIR)
# Find LibPROJ library and header file
# Sets
# LibPROJ_FOUND to 0 or 1 depending on the result
# LibPROJ_INCLUDE_DIR to directories required for using libproj4
# LibPROJ_LIBRARIES to libproj4 and any dependent libraries
# If LibPROJ_REQUIRED is defined, then a fatal error message will be generated if libproj4 is not found
if ( NOT LibPROJ_INCLUDE_DIR OR NOT LibPROJ_LIBRARIES OR NOT LibPROJ_FOUND )
if ( $ENV{LibPROJ_DIR} )
file( TO_CMAKE_PATH "$ENV{LibPROJ_DIR}" _LibPROJ_DIR )
endif ()
set(LibPROJ_LIBRARY_SEARCH_PATHS
${_LibPROJ_DIR}
${_LibPROJ_DIR}/lib64
${_LibPROJ_DIR}/lib
)
find_library( LibPROJ_LIBRARY_RELEASE
NAMES proj
HINTS
${LibPROJ_LIBRARY_SEARCH_PATHS}
)
find_library( LibPROJ_LIBRARY_DEBUG
NAMES projd
PATHS
${LibPROJ_LIBRARY_SEARCH_PATHS}
)
find_path( LibPROJ_INCLUDE_DIR
NAMES proj_api.h
HINTS
${_LibPROJ_DIR}
${_LibPROJ_DIR}/include
)
include(SelectLibraryConfigurations)
select_library_configurations(LibPROJ)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibPROJ
REQUIRED_VARS LibPROJ_LIBRARY LibPROJ_INCLUDE_DIR)
if(LibPROJ_FOUND)
set(LibPROJ_INCLUDE_DIRS ${LibPROJ_INCLUDE_DIR})
if(NOT LibPROJ_LIBRARIES)
set(LibPROJ_LIBRARIES ${LibPROJ_LIBRARY})
endif()
endif()
endif ()
mark_as_advanced(LibPROJ_INCLUDE_DIR)
......@@ -24,7 +24,7 @@ vtk_module(vtkGeovisCore
vtkInteractionWidgets
vtkRenderingCore
vtkViewsCore
vtklibproj4
vtklibproj
PRIVATE_DEPENDS
vtkCommonSystem
vtkFiltersCore
......
......@@ -27,7 +27,7 @@
#include <map>
#include <vector>
#include "vtk_libproj4.h"
#include "vtk_libproj.h"
vtkStandardNewMacro(vtkGeoProjection);
......
......@@ -23,7 +23,7 @@
*
*
* vtkGeoProjectionSource is a vtkGeoSource suitable for use in vtkTerrain2D.
* This source uses the libproj4 library to produce geometry patches at
* This source uses the libproj library to produce geometry patches at
* multiple resolutions. Each patch covers a specific region in projected
* space.
*/
......
......@@ -26,7 +26,7 @@
#include "vtkObjectFactory.h"
#include "vtkPoints.h"
#include "vtk_libproj4.h"
#include "vtk_libproj.h"
vtkStandardNewMacro(vtkGeoTransform);
vtkCxxSetObjectMacro(vtkGeoTransform, SourceProjection, vtkGeoProjection);
......
......@@ -10,7 +10,7 @@
* [jsoncpp](jsoncpp/update.sh)
* [kwiml](../Utilities/KWIML/update.sh)
* [kwsys](../Utilities/KWSys/update.sh)
* [libproj4](libproj4/update.sh)
* [libproj](libproj/update.sh)
* [libharu](libharu/update.sh)
* [lz4](lz4/update.sh)
* [metaio](../Utilities/MetaIO/update.sh)
......
vtk_module_third_party(LibPROJ
LIBRARIES vtkproj
INCLUDE_DIRS ${vtklibproj_SOURCE_DIR}/vtklibproj
${vtklibproj_BINARY_DIR}/vtklibproj)
vtk_module(vtklibproj EXCLUDE_FROM_WRAPPING)
......@@ -4,7 +4,7 @@ set -e
set -x
shopt -s dotglob
readonly name="libproj4"
readonly name="libproj"
readonly ownership="Proj Upstream <kwrobot@kitware.com>"
readonly subtree="ThirdParty/$name/vtk$name"
readonly repo="https://gitlab.kitware.com/third-party/proj.git"
......@@ -32,4 +32,3 @@ extract_source () {
}
. "${BASH_SOURCE%/*}/../update-common.sh"
/*=========================================================================
Program: Visualization Toolkit
Module: vtk_libproj4.h
Module: vtk_libproj.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,19 +12,19 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtk_libproj4_h
#define vtk_libproj4_h
#ifndef vtk_libproj_h
#define vtk_libproj_h
/* Use the libproj4 library configured for VTK. */
#cmakedefine VTK_USE_SYSTEM_LIBPROJ4
#ifdef VTK_USE_SYSTEM_LIBPROJ4
/* Use the libproj library configured for VTK. */
#cmakedefine VTK_USE_SYSTEM_LIBPROJ
#ifdef VTK_USE_SYSTEM_LIBPROJ
# include <projects.h>
# include <proj_api.h>
# include <geodesic.h>
#else
# include <vtklibproj4/src/projects.h>
# include <vtklibproj4/src/proj_api.h>
# include <vtklibproj4/src/geodesic.h>
# include <vtklibproj/src/projects.h>
# include <vtklibproj/src/proj_api.h>
# include <vtklibproj/src/geodesic.h>
#endif
#endif
This diff is collapsed.
This diff is collapsed.
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