Skip to content

Commit

Permalink
CMake should not check for libxcf90 since only libxcf03 is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
susilehtola authored and oschuett committed Oct 13, 2024
1 parent 2e877d3 commit 6025bbe
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cmake/modules/FindLibXC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,22 @@ include(cp2k_utils)
cp2k_set_default_paths(LIBXC "LibXC")

if(PKG_CONFIG_FOUND)
pkg_check_modules(CP2K_LIBXC IMPORTED_TARGET GLOBAL libxcf90 libxcf03
pkg_check_modules(CP2K_LIBXC IMPORTED_TARGET GLOBAL libxcf03
libxc>=${LibXC_FIND_VERSION})
endif()

if(NOT CP2K_LIBXC_FOUND)
# Revert pkg_check_modules side effects
cp2k_set_default_paths(LIBXC "LibXC")
foreach(_var xc xcf03 xcf90)
foreach(_var xc xcf03)
string(TOUPPER LIB${_var} _var_up)
cp2k_find_libraries(${_var_up} ${_var})
endforeach()
endif()

if(CP2K_LIBXC_FOUND
AND CP2K_LIBXCF90_FOUND
AND CP2K_LIBXCF03_FOUND)
if(CP2K_LIBXC_FOUND AND CP2K_LIBXCF03_FOUND)
set(CP2K_LIBXC_LINK_LIBRARIES
"${CP2K_LIBXCF03_LIBRARIES};${CP2K_LIBXCF90_LIBRARIES};${CP2K_LIBXC_LIBRARIES}"
)
"${CP2K_LIBXCF03_LIBRARIES};${CP2K_LIBXC_LIBRARIES}")
endif()

if(NOT CP2K_LIBXC_INCLUDE_DIRS)
Expand Down

0 comments on commit 6025bbe

Please sign in to comment.