Commit 634ed487 authored by Ryan S. Elliott's avatar Ryan S. Elliott
Browse files

Use pkg-config to find kim-api-v2 library settings

parent 796b6b2d
Loading
Loading
Loading
Loading
+2 −17
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@
# The KIM API package can be downloaded from https://openkim.org/kim-api
# Follow the instructions in the INSTALL file to build and install the
# KIM API.  Add the openkim.org Models you are interested in using.
# Make sure the directory where the "kim-api-build-conifg" utility is
# located is on the PATH.
#
# As long as you have followed the KIM API build and install instructions,
# there should not be any reason to change this file.
@@ -15,18 +13,5 @@

# Settings that the LAMMPS build will import when this package is installed


include ../../lib/kim/Makefile.KIM_DIR

ifeq ($(wildcard $(KIM_INSTALL_DIR)/bin/kim-api-v2-build-config),)
  KIM_CONFIG_HELPER = kim-api-v2-build-config
else
  KIM_CONFIG_HELPER = $(KIM_INSTALL_DIR)/bin/kim-api-v2-build-config
endif
ifeq ($(shell $(KIM_CONFIG_HELPER) --version 2> /dev/null),)
  $(error $(KIM_CONFIG_HELPER) utility is not available.  Something is wrong with your KIM API package setup)
endif

kim_SYSINC  = $(shell $(KIM_CONFIG_HELPER) --includes)
kim_SYSLIB  = $(shell $(KIM_CONFIG_HELPER) --ldlibs)
kim_SYSPATH = $(shell $(KIM_CONFIG_HELPER) --ldflags)
kim_SYSINC  = $(shell pkg-config --cflags libkim-api-v2)
kim_SYSLIB  = $(shell pkg-config --libs   libkim-api-v2)