This is mainly a query/call for help from @LiamBindle (which is why I've added him as a collaborator here).
The issue is that find_package(FLAP)
isn't quite working. With my latest edits, the geos
branch does okay with includes, but it fails on the link step. The problem is that the library the FLAPConfig.cmake
file refers to is the one in the build directory and not in the installation directory. So once you delete your build directory, things using FLAP fail.
As an example, I created a repo:
https://github.com/mathomp4/FLAPBug
Here, you first build FLAP (geos
branch) and notice what is in the FLAPConfig.cmake that is made:
# Import target "FLAP::FLAP" for configuration "Release"
set_property(TARGET FLAP::FLAP APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(FLAP::FLAP PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "Fortran"
IMPORTED_LOCATION_RELEASE "/home/mathomp4/FLAPCMakeBug/FLAP/build/src/lib/libFLAP.a"
)
That last one is pointing to the build, not the installed libFLAP.a.
Now, I tried various things to fix this and failed. In fact, I even tried a complete overhaul of FLAP's cmake system (see branch flap-like-face
). On the plus side, in that one you could do:
target_link_libraries(blah FLAP)
instead of:
target_link_libraries(FLAP::FLAP)
which seems "cleaner" but with the downside that nothing worked. At least in the geos
branch the include bits work.