[Proj] 4.9.1RC1 Released

Charles Karney charles.karney at sri.com
Sat Feb 21 11:13:55 EST 2015


On 02/21/2015 10:19 AM, Even Rouault wrote:
>> Attached (!) is a patch to install the right headers (include geodesic.h
>> >exclude internal headers).  The org_* headers aren't installed because
>> >JNI support is missing from cmake.
>> >
>> >I also added CH to be list of extra projections to be installed.
> Applied
>

The following patch addresses 2 cmake issues

(1) includes a missing source file in the library, geodesic.c, and
cleans up the way include files are installed (partially undoing a
patch in proj-4.9.1RC2.patch2);

(2) sets the run time loader path for the executables.

   --Charles

-------------- next part --------------
diff -ur proj-4.9.1RC2-patch2/src/bin_geod.cmake proj-4.9.1RC2-patch3/src/bin_geod.cmake
--- proj-4.9.1RC2-patch2/src/bin_geod.cmake	2015-02-20 16:20:34.000000000 -0500
+++ proj-4.9.1RC2-patch3/src/bin_geod.cmake	2015-02-21 10:46:07.499520005 -0500
@@ -1,6 +1,6 @@
 set(GEOD_SRC geod.c
-             geodesic.c geod_set.c geod_interface.c )
-set(GEOD_INCLUDE  geodesic.h geod_interface.h)
+             geod_set.c geod_interface.c )
+set(GEOD_INCLUDE geod_interface.h)
 
 source_group("Source Files\\Bin" FILES ${GEOD_SRC} ${GEOD_INCLUDE})
 
diff -ur proj-4.9.1RC2-patch2/src/CMakeLists.txt proj-4.9.1RC2-patch3/src/CMakeLists.txt
--- proj-4.9.1RC2-patch2/src/CMakeLists.txt	2015-02-20 16:20:34.000000000 -0500
+++ proj-4.9.1RC2-patch3/src/CMakeLists.txt	2015-02-21 11:01:46.351214089 -0500
@@ -8,6 +8,20 @@
 option(BUILD_GEOD "Build geod (computation of geodesic lines)" ON)
 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")
+  else ()
+    set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+    # 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"
+  endif ()
+endif ()
+
 if(BUILD_CS2CS)
  include(bin_cs2cs.cmake)
 endif(BUILD_CS2CS)
diff -ur proj-4.9.1RC2-patch2/src/lib_proj.cmake proj-4.9.1RC2-patch3/src/lib_proj.cmake
--- proj-4.9.1RC2-patch2/src/lib_proj.cmake	2015-02-21 09:27:39.176943000 -0500
+++ proj-4.9.1RC2-patch3/src/lib_proj.cmake	2015-02-21 10:51:22.395452207 -0500
@@ -145,8 +145,10 @@
         biveval.c
         dmstor.c
         emess.c
+        emess.h
         geocent.c
         geocent.h
+        geodesic.c
         mk_cheby.c
         nad_cvt.c
         nad_init.c
@@ -176,6 +178,7 @@
         pj_inv.c
         pj_latlong.c
         pj_list.c
+        pj_list.h
         pj_log.c
         pj_malloc.c
         pj_mlfn.c
@@ -197,21 +200,15 @@
         proj_rouss.c
         rtodms.c
         vector1.c
+        ${CMAKE_CURRENT_BINARY_DIR}/proj_config.h
  )
 
-set(HEADERS_LIBPROJ_INSTALL
+set(HEADERS_LIBPROJ
         projects.h
         proj_api.h
         geodesic.h
 )
 
-set(HEADERS_LIBPROJ
-        ${HEADERS_LIBPROJ_INSTALL}
-        pj_list.h
-        emess.h
-        ${CMAKE_CURRENT_BINARY_DIR}/proj_config.h
- )
-
 # Group source files for IDE source explorers (e.g. Visual Studio)
 source_group("Header Files" FILES ${HEADERS_LIBPROJ})
 source_group("Source Files\\Core" FILES ${SRC_LIBPROJ_CORE})
@@ -230,9 +227,9 @@
 if(JNI_SUPPORT)
   set(SRC_LIBPROJ_CORE ${SRC_LIBPROJ_CORE}
                        jniproj.c )
-  set(HEADERS_JNI org_proj4_PJ.h org_proj4_Projections.h)
-  set(HEADERS_LIBPROJ_INSTALL ${HEADERS_LIBPROJ_INSTALL} ${HEADERS_JNI})
-  set(HEADERS_LIBPROJ ${HEADERS_LIBPROJ} ${HEADERS_JNI})
+  set(HEADERS_LIBPROJ ${HEADERS_LIBPROJ}
+                        org_proj4_PJ.h
+                        org_proj4_Projections.h)
   source_group("Source Files\\JNI" FILES ${SRC_LIBPROJ_JNI})
   add_definitions(-DJNI_ENABLED)
   include_directories( ${JNI_INCLUDE_DIRS})
@@ -306,7 +303,7 @@
         FRAMEWORK DESTINATION ${FRAMEWORKDIR})
 
 if(NOT BUILD_FRAMEWORKS_AND_BUNDLE)
-  install(FILES ${HEADERS_LIBPROJ_INSTALL}
+  install(FILES ${ALL_LIBPROJ_HEADERS}
         DESTINATION ${INCLUDEDIR})
 endif(NOT BUILD_FRAMEWORKS_AND_BUNDLE)
 


More information about the Proj mailing list