pism
pism copied to clipboard
FindPISM.cmake?
Is there a FindPISM.cmake, or something with equivalent functionality?
Not yet.
Could you describe the functionality you need?
In PISM's current dev branch and upcoming releases: use pkg-config to link with PISM's library code.
- Install PISM to
PISM_PREFIX - Add
$PISM_PREFIX/lib/pkgconfigtoPKG_CONFIG_PATH - Use
pkg-config --cflags pismandpkg-config --libs pismto get compiler and linker flags.
With CMake >= 3.7, follow steps 1 and 2, then use this:
find_package(PkgConfig REQUIRED)
pkg_search_module(PISM REQUIRED IMPORTED_TARGET pism)
if (PISM_FOUND)
message(STATUS
"Found PISM: ${PISM_PREFIX} (found version \"${PISM_VERSION}\")")
endif()
target_link_libraries(some_target PkgConfig::PISM)