Files
registry_dashboard/CMakeLists.txt
T
egutierrez 5b7001ebfb refactor: reemplazar cpp-httplib por HTTP client minimalista
cpp-httplib requiere std::mutex que no compila con MinGW win32
thread model. Se reemplaza por http_client.cpp: sockets crudos,
sin threading, sin SSL, funciona en ambos thread models.
Elimina vendor/httplib.h (10K lineas). nlohmann/json se mantiene.

main.cpp: doble clic sin argumentos intenta la API en localhost:8484
automaticamente. Si falla muestra pantalla de error con boton Retry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 01:45:30 +02:00

45 lines
1.5 KiB
CMake

# SQLite3: use system library on Linux, vendored amalgamation on Windows cross-compile
find_package(SQLite3 QUIET)
if(NOT SQLite3_FOUND)
# Build from amalgamation
set(SQLITE3_AMALG_DIR ${CMAKE_SOURCE_DIR}/vendor/sqlite3)
add_library(sqlite3_vendored STATIC ${SQLITE3_AMALG_DIR}/sqlite3.c)
target_include_directories(sqlite3_vendored PUBLIC ${SQLITE3_AMALG_DIR})
target_compile_definitions(sqlite3_vendored PRIVATE
SQLITE_THREADSAFE=1
SQLITE_ENABLE_FTS5
SQLITE_ENABLE_JSON1
)
# Alias so we can use the same target name
add_library(SQLite::SQLite3 ALIAS sqlite3_vendored)
endif()
add_imgui_app(registry_dashboard
main.cpp
data.cpp
data_http.cpp
http_client.cpp
views.cpp
${CMAKE_SOURCE_DIR}/functions/viz/kpi_card.cpp
${CMAKE_SOURCE_DIR}/functions/viz/bar_chart.cpp
${CMAKE_SOURCE_DIR}/functions/viz/pie_chart.cpp
${CMAKE_SOURCE_DIR}/functions/viz/table_view.cpp
${CMAKE_SOURCE_DIR}/functions/viz/sparkline.cpp
${CMAKE_SOURCE_DIR}/functions/core/dashboard_panel.cpp
${CMAKE_SOURCE_DIR}/functions/core/dashboard_grid.cpp
${CMAKE_SOURCE_DIR}/functions/core/fps_overlay.cpp
${CMAKE_SOURCE_DIR}/functions/core/fullscreen_window.cpp
)
target_include_directories(registry_dashboard PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/vendor
)
target_link_libraries(registry_dashboard PRIVATE SQLite::SQLite3)
# Sockets: ws2_32 on Windows, nothing extra on Linux
if(WIN32)
target_link_libraries(registry_dashboard PRIVATE ws2_32)
endif()