1 find_package(PkgConfig REQUIRED)
2 pkg_search_module(ISL isl)
3 if (NOT ISL_FOUND EQUAL 1)
4 message(FATAL_ERROR "No libisl found on this system. Consider setting PKG_CONFIG_PATH.")
7 add_library(ISL INTERFACE IMPORTED)
8 foreach (incl IN LISTS ISL_INCLUDE_DIRS)
9 set_property(TARGET ISL APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${incl})
12 foreach (libname IN LISTS ISL_LIBRARIES)
14 foreach (dir IN LISTS ISL_LIBRARY_DIRS)
15 list(APPEND hints ${dir})
18 find_library(lib NAMES ${libname} HINTS ${hints} NO_DEFAULT_PATH)
19 set_property(TARGET ISL APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${lib})
22 foreach (opt IN LISTS ISL_CFLAGS ISL_CFLAGS_OTHER)
23 set_property(TARGET ISL APPEND PROPERTY INTERFACE_COMPILE_OPTIONS ${opt})