1 # This file allows users to call find_package(Polly) and pick up our targets.
3 find_package(LLVM REQUIRED CONFIG
4 HINTS "@POLLY_CONFIG_LLVM_CMAKE_DIR@")
6 set(Polly_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
7 set(Polly_BUNDLED_ISL @POLLY_BUNDLED_ISL@)
8 set(Polly_ENABLE_GPGPU_CODEGEN @POLLY_ENABLE_GPGPU_CODEGEN@)
10 set(Polly_DEFINITIONS ${LLVM_DEFINITIONS})
11 set(Polly_INCLUDE_DIRS @POLLY_CONFIG_INCLUDE_DIRS@ ${LLVM_INCLUDE_DIRS})
12 set(Polly_LIBRARY_DIRS @POLLY_CONFIG_LIBRARY_DIRS@)
13 set(Polly_EXPORTED_TARGETS @POLLY_CONFIG_EXPORTED_TARGETS@)
14 set(Polly_LIBRARIES ${LLVM_LIBRARIES} ${Polly_EXPORTED_TARGETS})
19 if (Polly_ENABLE_GPGPU_CODEGEN AND NOT TARGET PollyPPCG)
20 add_library(PollyPPCG @POLLY_CONFIG_TARGET_PollyPPCG_TYPE@ IMPORTED)
21 set_property(TARGET PollyPPCG PROPERTY INTERFACE_LINK_LIBRARIES @ISL_TARGET@)
25 add_library(Polly @POLLY_CONFIG_TARGET_Polly_TYPE@ IMPORTED)
26 set_property(TARGET Polly PROPERTY INTERFACE_LINK_LIBRARIES @ISL_TARGET@)
27 if (Polly_ENABLE_GPGPU_CODEGEN)
28 set_property(TARGET Polly APPEND PROPERTY INTERFACE_LINK_LIBRARIES PollyPPCG)
32 if (NOT TARGET LLVMPolly)
33 add_library(LLVMPolly @POLLY_CONFIG_TARGET_LLVMPolly_TYPE@ IMPORTED)
34 set_property(TARGET LLVMPolly PROPERTY INTERFACE_LINK_LIBRARIES Polly)
38 file(GLOB CONFIG_FILES "${Polly_CMAKE_DIR}/PollyExports-*.cmake")
39 foreach(f ${CONFIG_FILES})