#
# Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
#

project(IntelGraphicsCompiler)

set(IGC_LIBRARY_NAME "igc")
set(IGC_LIBRARY_NAME "${IGC_LIBRARY_NAME}" PARENT_SCOPE)
set(FCL_LIBRARY_NAME "igdfcl")
set(FCL_LIBRARY_NAME "${FCL_LIBRARY_NAME}" PARENT_SCOPE)

add_library(igc SHARED IMPORTED GLOBAL)
set_property(TARGET igc PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/lib${IGC_LIBRARY_NAME}.so")
set_property(TARGET igc PROPERTY "INTERFACE_INCLUDE_DIRECTORIES" "${CMAKE_CURRENT_SOURCE_DIR}/inc/")

add_library(opencl_clang SHARED IMPORTED GLOBAL)
set_property(TARGET opencl_clang PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/libopencl_clang.so")

add_library(iga SHARED IMPORTED GLOBAL)
set_property(TARGET iga PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/libiga64.so")

add_library(fcl SHARED IMPORTED GLOBAL)
set_property(TARGET fcl PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/lib${FCL_LIBRARY_NAME}.so")

list(APPEND IGC__IGC_TARGETS "igc")
list(APPEND IGC__IGC_TARGETS "iga")
list(APPEND IGC__IGC_TARGETS "fcl")
list(APPEND IGC__IGC_TARGETS "opencl_clang")

set(IGC__IGC_TARGETS "${IGC__IGC_TARGETS}" PARENT_SCOPE)
