add_imgui_app(image_to_3d_studio
    main.cpp
    # Funciones del registry usadas (issue 0085 — declaracion explicita en CMake):
    ${CMAKE_SOURCE_DIR}/functions/core/http_request.cpp
    ${CMAKE_SOURCE_DIR}/functions/gfx/gl_texture_load.cpp
    # Implementacion stb_image (gl_texture_load la usa):
    ${CMAKE_SOURCE_DIR}/vendor/stb/stb_image_impl.cpp
    # Visor 3D: GLB loader + mesh GPU + orbit camera + FBO + mesh_viewer.
    # (gl_loader viene bundled en fn_framework; el resto se enlaza aqui.)
    ${CMAKE_SOURCE_DIR}/functions/gfx/gltf_load_mesh.cpp
    ${CMAKE_SOURCE_DIR}/functions/gfx/mesh_gpu.cpp
    ${CMAKE_SOURCE_DIR}/functions/gfx/gl_framebuffer.cpp
    ${CMAKE_SOURCE_DIR}/functions/core/orbit_camera.cpp
    ${CMAKE_SOURCE_DIR}/functions/viz/mesh_viewer.cpp
)
target_include_directories(image_to_3d_studio PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/vendor   # nlohmann/json.hpp para gltf_load_mesh
)

if(WIN32)
    set_target_properties(image_to_3d_studio PROPERTIES WIN32_EXECUTABLE TRUE)
endif()
