150
|
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.")
|
|
5 endif()
|
|
6
|
|
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})
|
|
10 endforeach()
|
|
11
|
|
12 foreach (libname IN LISTS ISL_LIBRARIES)
|
|
13 if (ISL_LIBRARY_DIRS)
|
|
14 foreach (dir IN LISTS ISL_LIBRARY_DIRS)
|
|
15 list(APPEND hints ${dir})
|
|
16 endforeach()
|
|
17 endif()
|
|
18 find_library(lib NAMES ${libname} HINTS ${hints} NO_DEFAULT_PATH)
|
|
19 set_property(TARGET ISL APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${lib})
|
|
20 endforeach()
|
|
21
|
|
22 foreach (opt IN LISTS ISL_CFLAGS ISL_CFLAGS_OTHER)
|
|
23 set_property(TARGET ISL APPEND PROPERTY INTERFACE_COMPILE_OPTIONS ${opt})
|
|
24 endforeach()
|