# This file will be regenerated by `mulle-sourcetree-to-cmake` via
# `mulle-sde reflect` and any edits will be lost.
#
# This file will be included by cmake/share/Files.cmake
#
# Disable generation of this file with:
#
# mulle-sde environment set MULLE_SOURCETREE_TO_CMAKE_DEPENDENCIES_FILE DISABLE
#
if( MULLE_TRACE_INCLUDE)
   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

#
# Generated from sourcetree: A3ED849C-ECFE-4FB8-8E50-D5245D67E30B;mulle-c11;no-all-load,no-cmake-inherit,no-import,no-link,no-recurse,no-singlephase;
# Disable with : `mulle-sourcetree mark mulle-c11 no-header`
# Disable for this platform: `mulle-sourcetree mark mulle-c11 no-cmake-platform-${MULLE_UNAME}`
#
if( NOT MULLE_C11_HEADER)
   find_file( MULLE_C11_HEADER NAMES mulle-c11.h mulle-c11/mulle-c11.h)
   message( STATUS "MULLE_C11_HEADER is ${MULLE_C11_HEADER}")

   #
   # Add MULLE_C11_HEADER to HEADER_ONLY_LIBRARIES list.
   # Disable with: `mulle-sourcetree mark mulle-c11 no-cmake-add`
   #
   set( HEADER_ONLY_LIBRARIES
      ${MULLE_C11_HEADER}
      ${HEADER_ONLY_LIBRARIES}
      CACHE INTERNAL "need to cache this"
   )
   if( MULLE_C11_HEADER)
      # intentionally left blank
   else()
      # Disable with: `mulle-sourcetree mark mulle-c11 no-require`
      message( FATAL_ERROR "MULLE_C11_HEADER was not found")
   endif()
endif()



#
# Generated from sourcetree: 8D2BE61C-D741-4FCC-8A99-5EB39BBE7A3E;dlfcn-win32;no-all-load,no-cmake-loader,no-cmake-searchpath,no-dynamic-link,no-import,no-intermediate-link,only-platform-mingw,only-platform-windows;dl
# Disable with : `mulle-sourcetree mark dlfcn-win32 no-link`
# Disable for this platform: `mulle-sourcetree mark dlfcn-win32 no-cmake-platform-${MULLE_UNAME}`
#
if( ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
   if( NOT DL_LIBRARY)
      find_library( DL_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}dl${CMAKE_STATIC_LIBRARY_SUFFIX} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
      message( STATUS "DL_LIBRARY is ${DL_LIBRARY}")
      #
      # The order looks ascending, but due to the way this file is read
      # it ends up being descending, which is what we need.
      #
      if( DL_LIBRARY)
         #
         # Add DL_LIBRARY to STARTUP_DEPENDENCY_LIBRARIES list.
         # Disable with: `mulle-sourcetree mark dlfcn-win32 no-cmake-add`
         #
         set( STARTUP_DEPENDENCY_LIBRARIES
            ${STARTUP_DEPENDENCY_LIBRARIES}
            ${DL_LIBRARY}
            CACHE INTERNAL "need to cache this"
         )
         #
         # Inherit information from dependency.
         # Encompasses: no-cmake-searchpath,no-cmake-dependency,no-cmake-loader
         # Disable with: `mulle-sourcetree mark dlfcn-win32 no-cmake-inherit`
         #
         # temporarily expand CMAKE_MODULE_PATH
         get_filename_component( _TMP_DL_ROOT "${DL_LIBRARY}" DIRECTORY)
         get_filename_component( _TMP_DL_ROOT "${_TMP_DL_ROOT}" DIRECTORY)
         #
         #
         # Search for "DependenciesAndLibraries.cmake" to include.
         # Disable with: `mulle-sourcetree mark dlfcn-win32 no-cmake-dependency`
         #
         foreach( _TMP_DL_NAME "dl")
            set( _TMP_DL_DIR "${_TMP_DL_ROOT}/include/${_TMP_DL_NAME}/cmake")
            # use explicit path to avoid "surprises"
            if( EXISTS "${_TMP_DL_DIR}/DependenciesAndLibraries.cmake")
               unset( DL_DEFINITIONS)
               list( INSERT CMAKE_MODULE_PATH 0 "${_TMP_DL_DIR}")
               # we only want top level INHERIT_OBJC_LOADERS, so disable them
               if( NOT NO_INHERIT_OBJC_LOADERS)
                  set( NO_INHERIT_OBJC_LOADERS OFF)
               endif()
               list( APPEND _TMP_INHERIT_OBJC_LOADERS ${NO_INHERIT_OBJC_LOADERS})
               set( NO_INHERIT_OBJC_LOADERS ON)
               #
               include( "${_TMP_DL_DIR}/DependenciesAndLibraries.cmake")
               #
               list( GET _TMP_INHERIT_OBJC_LOADERS -1 NO_INHERIT_OBJC_LOADERS)
               list( REMOVE_AT _TMP_INHERIT_OBJC_LOADERS -1)
               #
               list( REMOVE_ITEM CMAKE_MODULE_PATH "${_TMP_DL_DIR}")
               set( INHERITED_DEFINITIONS
                  ${INHERITED_DEFINITIONS}
                  ${DL_DEFINITIONS}
                  CACHE INTERNAL "need to cache this"
               )
               break()
            else()
               message( STATUS "${_TMP_DL_DIR}/DependenciesAndLibraries.cmake not found")
            endif()
         endforeach()
      else()
         # Disable with: `mulle-sourcetree mark dlfcn-win32 no-require-link`
         message( FATAL_ERROR "DL_LIBRARY was not found")
      endif()
   endif()
endif()
