diff --git a/3rdParty/assimp/CMakeLists.txt b/3rdParty/assimp/CMakeLists.txt index 4524135..a7179c4 100644 --- a/3rdParty/assimp/CMakeLists.txt +++ b/3rdParty/assimp/CMakeLists.txt @@ -1,5 +1,6 @@ include(FetchContent) +unset(assimp_FOUND) find_package(assimp QUIET) if (assimp_FOUND) message("Using system assimp") @@ -25,15 +26,15 @@ elseif (USE_ASSIMP) FetchContent_MakeAvailable(assimp) - set(assimp_FOUND "fetched assimp found" CACHE INTERNAL ON) + set(assimp_BUILT "fetched assimp found" CACHE INTERNAL ON) endif () function(LinkAssimp TARGET) - if (NOT assimp_FOUND) + if (NOT assimp_BUILT) find_package(assimp QUIET) endif () - if (assimp_FOUND) + if (assimp_FOUND OR assimp_BUILT) target_link_libraries(${TARGET} PUBLIC assimp) endif () endfunction() \ No newline at end of file