#add_library(${TG_IMPORTED} SHARED IMPORTED GLOBAL)
#
#set_target_properties(${TG_IMPORTED} PROPERTIES
#        IMPORTED_IMPLIB
#        "${CMAKE_SOURCE_DIR}/3rd/assimp/$<IF:$<CONFIG:Debug>,Debug,Release>/lib/assimp-vc143-mt$<$<CONFIG:Debug>:d>.lib"
#        IMPORTED_LOCATION
#        "${CMAKE_SOURCE_DIR}/3rd/assimp/$<IF:$<CONFIG:Debug>,Debug,Release>/bin/assimp-vc143-mt$<$<CONFIG:Debug>:d>.dll"
#)


add_library(${TG_IMPORTED} SHARED IMPORTED GLOBAL)

set(ASSIMP_ROOT "${CMAKE_SOURCE_DIR}/3rd/assimp")

set_target_properties(${TG_IMPORTED} PROPERTIES
        IMPORTED_CONFIGURATIONS "DEBUG;RELEASE"

        IMPORTED_IMPLIB_DEBUG
        "${ASSIMP_ROOT}/Debug/lib/assimp-vc143-mtd.lib"
        IMPORTED_LOCATION_DEBUG
        "${ASSIMP_ROOT}/Debug/bin/assimp-vc143-mtd.dll"

        IMPORTED_IMPLIB_RELEASE
        "${ASSIMP_ROOT}/Release/lib/assimp-vc143-mt.lib"
        IMPORTED_LOCATION_RELEASE
        "${ASSIMP_ROOT}/Release/bin/assimp-vc143-mt.dll"

        # 另外两个常见配置使用 Release 版本
        MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE
        MAP_IMPORTED_CONFIG_MINSIZEREL RELEASE
)

#if (DEFINED (Debug))
#    list(APPEND CMAKE_PREFIX_PATH ${ASSIMP_ROOT}/Debug)
#else ()
#    list(APPEND CMAKE_PREFIX_PATH ${ASSIMP_ROOT}/Release)
#endif ()


#CMake专门提供了：
#IMPORTED_LOCATION_<CONFIG>
#IMPORTED_IMPLIB_<CONFIG>
#来描述 imported target 在不同构建配置下的文件位置








