# make targets for boost if find module did not do the job

if(NOT TARGET Boost::system)
  add_library(Boost::system UNKNOWN IMPORTED)
  set_target_properties(Boost::system PROPERTIES
      INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      IMPORTED_LOCATION         "${Boost_SYSTEM_LIBRARY}"
      IMPORTED_LOCATION_DEBUG   "${Boost_SYSTEM_LIBRARY_DEBUG}"
      IMPORTED_LOCATION_RELEASE "${Boost_SYSTEM_LIBRARY_RELEASE}"
  )
endif()

if(NOT TARGET Boost::filesystem)
  add_library(Boost::filesystem UNKNOWN IMPORTED)
  set_target_properties(Boost::filesystem PROPERTIES
     INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      INTERFACE_COMPILE_DEFINITIONS BOOST_FILESYSTEM_VERSION=3
      INTERFACE_LINK_LIBRARIES  "${boost_system}"
      IMPORTED_LOCATION         "${Boost_FILESYSTEM_LIBRARY}"
      IMPORTED_LOCATION_DEBUG   "${Boost_FILESYSTEM_LIBRARY_DEBUG}"
      IMPORTED_LOCATION_RELEASE "${Boost_FILESYSTEM_LIBRARY_RELEASE}"
  )
endif()

if(NOT TARGET Boost::regex)
  add_library(Boost::regex UNKNOWN IMPORTED)
  set_target_properties(Boost::regex PROPERTIES
      INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      INTERFACE_LINK_LIBRARIES  "${boost_system}"
      IMPORTED_LOCATION         "${Boost_REGEX_LIBRARY}"
      IMPORTED_LOCATION_DEBUG   "${Boost_REGEX_LIBRARY_DEBUG}"
      IMPORTED_LOCATION_RELEASE "${Boost_REGEX_LIBRARY_RELEASE}"
  )
endif()

if(NOT TARGET Boost::unit_test_framework)
  add_library(Boost::unit_test_framework UNKNOWN IMPORTED)
  set_target_properties(Boost::unit_test_framework PROPERTIES
      INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
      INTERFACE_LINK_LIBRARIES  "${boost_system}"
      IMPORTED_LOCATION         "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}"
      IMPORTED_LOCATION_DEBUG   "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG}"
      IMPORTED_LOCATION_RELEASE "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE}"
  )
endif()
