Commit a7318abc authored by jan.koester's avatar jan.koester
Browse files

test

parent 45dc37b7
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -79,10 +79,20 @@ else()
    endif()
endif()

# 6. Finaler Status und Ziel-Überprüfung
if(TARGET YAML::YAML)
    message(STATUS "libyaml is successfully available via target YAML::YAML.")
else()
    # This should now only happen if the CONFIG search found something unrecognized
    message(FATAL_ERROR "libyaml found, but failed to create the final target YAML::YAML.")
# In your custom FindYAML logic, *immediately* after find_package(yaml CONFIG QUIET)

if(yaml_FOUND)
    # Check if the CONFIG file created the lowercase target
    if(TARGET yaml::yaml AND NOT TARGET YAML::YAML)
        # Create the ALIAS that backends/CMakeLists.txt needs
        add_library(YAML::YAML ALIAS yaml::yaml) 
        message(STATUS "SUCCESS: Created ALIAS target YAML::YAML -> yaml::yaml.")
    
    # ... (Other checks for LibYAML::LibYAML, etc.) ...
    
    elseif(NOT TARGET YAML::YAML)
        # If the CONFIG search found the package but didn't create a target we recognize, 
        # the build will fail. Log this for debugging.
        message(WARNING "libyaml found via CONFIG, but failed to create or find target YAML::YAML.")
    endif()
endif()
 No newline at end of file