aboutsummaryrefslogtreecommitdiff
path: root/ports/geographiclib/cxx-library-only.patch
blob: 88ffc812527b387cb3f457822d5d04000c3ac64a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
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}