vcpkg/ports/geographiclib/cxx-library-only.patch
Charles Karney e554608135
[geographiclib] Update to 1.50.1 (#12379)
* Upgrade geographiclib to version 1.50.1

* Tinker with sourceforge download

* Strip verbiage at top of geographiclib/portfile.cmake

* geographiclib: fix for windows build

* geographiclib: minimize size of patch file

* add missing manifest

* A stab at fixing uwp build error.  But I'm working in the dark!

* Back out of previous commit.  It didn't help.

* Call cmake_minimum_required first

* geographiclib: remove tools from build -- incompatible with uwp

* geographiclib: remove stray reference to TOOLS

* geographiclib: try installing executables into tools

* geographiclib: Do not build tools for uwp

* geographiclib: fix up build of tools

* geographiclib: Minor clean up

* geographiclib: handle uwp vs tools more elegantly

* geographiclib: reformation vcpkg,json

* geographiclib: don't build tools by default

* geographiclib: Don't register the tools as targets; this causes problems if they are moved

Co-authored-by: Charles Karney <charles.karney@sri.com>
2020-07-14 08:44:21 -07:00

131 lines
4.7 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30875ddb..34aa6515 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -464,12 +464,12 @@ endif ()
# documentation files into the source tree. Skip Apple here because
# man/makeusage.sh uses "head --lines -4" to drop the last 4 lines of a
# file and there's no simple equivalent for MacOSX
-if (NOT WIN32 AND NOT APPLE)
+if (NOT WIN32 AND NOT APPLE AND FALSE)
find_program (HAVE_POD2MAN pod2man)
find_program (HAVE_POD2HTML pod2html)
find_program (HAVE_COL col)
endif ()
-if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL)
+if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL AND FALSE)
set (MAINTAINER ON)
else ()
set (MAINTAINER OFF)
@@ -496,25 +496,34 @@ if (WIN32)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
endif ()
+if (SKIP_TOOLS)
+ set (TOOLS)
+ set (SCRIPTS)
+else ()
# The list of tools (to be installed into, e.g., /usr/local/bin)
set (TOOLS CartConvert ConicProj GeodesicProj GeoConvert GeodSolve
GeoidEval Gravity MagneticField Planimeter RhumbSolve TransverseMercatorProj)
# The list of scripts (to be installed into, e.g., /usr/local/sbin)
set (SCRIPTS geographiclib-get-geoids geographiclib-get-gravity
geographiclib-get-magnetic)
+endif ()
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
# The list of subdirectories to process
add_subdirectory (src)
add_subdirectory (include/GeographicLib)
+if (NOT SKIP_TOOLS)
add_subdirectory (tools)
+endif ()
+if (FALSE)
add_subdirectory (man)
add_subdirectory (doc)
add_subdirectory (js)
add_subdirectory (matlab)
add_subdirectory (python/geographiclib)
add_subdirectory (examples)
+endif ()
if (MSVC AND BUILD_NETGEOGRAPHICLIB)
if (GEOGRAPHICLIB_PRECISION EQUAL 2)
set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 90e773ba..c9a303b0 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -33,10 +33,10 @@ configure_file (project-config.cmake.in
configure_file (project-config-version.cmake.in
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake" @ONLY)
export (TARGETS
- ${PROJECT_ALL_LIBRARIES} ${TOOLS}
+ ${PROJECT_ALL_LIBRARIES}
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-targets.cmake")
export (TARGETS
- ${PROJECT_ALL_LIBRARIES} ${TOOLS}
+ ${PROJECT_ALL_LIBRARIES}
NAMESPACE ${PROJECT_NAME}::
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-namespace-targets.cmake")
@@ -44,15 +44,9 @@ export (TARGETS
# ${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 (COMMON_INSTALL_PATH)
- # Install under lib${LIB_SUFFIX} so that 32-bit and 64-bit packages
- # can be installed on a single machine.
- set (INSTALL_CMAKE_DIR "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
- set (PROJECT_ROOT_DIR "../../..")
-else ()
- set (INSTALL_CMAKE_DIR "cmake")
- set (PROJECT_ROOT_DIR "..")
-endif ()
+ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME_LOWER}")
+ set (PROJECT_ROOT_DIR "../..")
+
# @PROJECT_INCLUDE_DIRS@ is not used in the install tree; reset
# it to prevent the source and build paths appearing in the installed
# config files
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index b8c028c7..26e4ba14 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,7 +1,7 @@
# Build the tools...
# Where to find the *.usage files for the --help option.
-include_directories (${PROJECT_BINARY_DIR}/man)
+include_directories (${PROJECT_SOURCE_DIR}/man)
# Only needed if target_compile_definitions is not supported
add_definitions (${PROJECT_DEFINITIONS})
@@ -16,7 +16,7 @@ foreach (TOOL ${TOOLS})
add_dependencies (tools ${TOOL})
set_source_files_properties (${TOOL}.cpp PROPERTIES
- OBJECT_DEPENDS ${PROJECT_BINARY_DIR}/man/${TOOL}.usage)
+ OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/man/${TOOL}.usage)
target_link_libraries (${TOOL} ${PROJECT_LIBRARIES} ${HIGHPREC_LIBRARIES})
@@ -35,7 +35,7 @@ if (APPLE)
endif ()
# Specify where the tools are installed, adding them to the export targets
-install (TARGETS ${TOOLS} EXPORT targets DESTINATION bin)
+install (TARGETS ${TOOLS} DESTINATION tools)
if (MSVC AND PACKAGE_DEBUG_LIBS)
# Possibly don't EXPORT the debug versions of the tools and then this
@@ -55,7 +55,7 @@ set_property (TARGET tools ${TOOLS} PROPERTY FOLDER tools)
# systems. This needs to substitute ${GEOGRAPHICLIB_DATA} as the
# default data directory. These are installed under sbin, because it is
# expected to be run with write access to /usr/local.
-if (NOT WIN32)
+if (NOT WIN32 AND FALSE)
foreach (SCRIPT ${SCRIPTS})
configure_file (${SCRIPT}.sh scripts/${SCRIPT} @ONLY)
add_custom_command (OUTPUT ${SCRIPT}