[PROJ] Custom PROJ_DATA_PATH Output Directory

Peter Townsend peter.townsend at maplarge.com
Tue Dec 3 08:38:42 PST 2024


Greetings,

9.5 added the PROJ_OUTPUT_NAME cmake parameter to change the name of the
output lib /DLL files, which is absolutely great and I love it. But I also
want to customize the output directory for the proj.db file and its friends.

I've found that I can change this line here I can change it from
/usr/local/share/proj to /usr/local/share/somethingElse

/CMakeLists.txt
set(PROJ_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/proj")
to
set(PROJ_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/somethingElse")

Is there a better way to do this? Or could we add a new cmake parameter to
override either the end piece or the whole thing if it's set? Call it
PROJ_DATA_OUTPUT_PATH or PROJ_DATA_PATH_OVERRIDE?

if(DEFINED PROJ_DATA_PATH_OVERRIDE)
  set(PROJ_DATA_PATH
"${CMAKE_INSTALL_FULL_DATADIR}/${PROJ_DATA_PATH_OVERRIDE}")
  message(WARNING "PROJ_DATA_PATH option has been modified to the new value
of '${PROJ_DATA_PATH_OVERRIDE}'")
else()
  set(PROJ_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/proj")
endif()

-- 
Peter Townsend
Senior Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20241203/09121f4c/attachment.htm>


More information about the PROJ mailing list