[PROJ] cmake find_package() fails to find PROJ6 installed with MacPorts
Mike Taves
mwtoews at gmail.com
Wed Jun 1 14:34:41 PDT 2022
On Thu, 2 Jun 2022 at 07:55, Tom O'Reilly <oreilly at mbari.org> wrote:
>
> My project needs proj6, but as a test of cmake I installed proj9 with MacPorts - and find_package(Proj9 CONFIG REQUIRED) fails just as before.
> Question - if the installed proj9 provides CONFIG support, I presume there is a proj9-config.cmake or Proj9Config.cmake file somewhere. Where would I look for this file? I see /opt/local/lib/proj9 - but the file is not in there. Would this file be in there if proj9 supports CONFIG mode or is there some other place to look?
Use the following:
find_package(PROJ CONFIG REQUIRED)
target_link_libraries(MyApp PRIVATE PROJ::proj)
See https://proj.org/development/cmake.html for more.
More information about the PROJ
mailing list