#
# Copyright (C) Troy D. Straszheim
#
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at
#   http://www.boost.org/LICENSE_1_0.txt
#

#
# This file is generated by cmake and installed to 
# BOOST_VERSIONED_CMAKE_FILES_DIR/Boost-1.41.0.
# 
# when a users does a find_package(Boost ...) BoostConfigVersion.cmake
# and BoostVersion.cmake will search for this file.
#

#
#  Various variables
#
#set(Boost_VERSION "x.xx.x")
set(Boost_INCLUDE_DIRS "${MY_BOOST_DIR}/include/boost-${MY_BOOST_VERSION}")
set(Boost_INCLUDE_DIR "${MY_BOOST_DIR}/include/boost-${MY_BOOST_VERSION}"
  CACHE FILEPATH "Boost include directory")
set(Boost_LIBRARY_DIRS "${MY_BOOST_DIR}/lib")
#
#  Include the imported targets
#
include("${Boost_DIR}/Boost.cmake")

#
#  Calculate target suffix from user variables
#
if (NOT DEFINED Boost_USE_MULTITHREADED)
  set(Boost_USE_MULTITHREADED TRUE)
endif()


if (Boost_USE_MULTITHREADED)
  set(mtflag "-mt")
  set(mtdesc "multi-threaded")
else()
  set(mtflag "")
  set(mtdesc "single-threaded")
endif()

if (Boost_USE_STATIC)
  set(staticflag "-static")
  set(staticdesc "statically-linked")
else()
  set(staticflag "-shared")
  set(staticdesc "dynamically-linked")
endif()

set(Boost_LIBRARIES "")
if (NOT Boost_FIND_COMPONENTS)
  set(Boost_FIND_COMPONENTS "wave;signals;program_options;iostreams;filesystem;unit_test_framework;system;python;graph;wserialization;regex;thread;date_time")
endif()

foreach(component ${Boost_FIND_COMPONENTS})
  #
  # Check that it is really a target
  # 
  set(target boost_${component}${mtflag}${staticflag})
  get_target_property(p ${target} TYPE)
  if (p MATCHES "_LIBRARY$")
    list(APPEND Boost_LIBRARIES "optimized;${target}")
  #else()
  #list(APPEND Boost_LIBRARIES "optimized;${target}-NOT_FOUND_IN_LOCAL_BOOST_INSTALLATION")
  endif()


  get_target_property(p ${target}-debug TYPE)
  if (p MATCHES "_LIBRARY$")
    list(APPEND Boost_LIBRARIES "debug;${target}-debug")
  #else()
  #list(APPEND Boost_LIBRARIES "debug;${target}-NOT_FOUND_IN_LOCAL_BOOST_INSTALLATION")
  endif()

endforeach()

