2024-12-20 19:42:16 +00:00
|
|
|
set(WinSQLite3_Found FALSE)
|
|
|
|
|
|
|
|
if (MSVC AND USE_WIN_SQLITE3)
|
|
|
|
set(ProgramFiles_x86 "$ENV{ProgramFiles\(x86\)}")
|
|
|
|
file(GLOB WindowsKitLibs "${ProgramFiles_x86}/Windows Kits/10/Lib/10.0.*/um/${CMAKE_VS_PLATFORM_NAME}")
|
|
|
|
find_library(LibWinSQLite3 WinSQLite3 PATHS ${WindowsKitLibs})
|
|
|
|
if (LibWinSQLite3)
|
|
|
|
set(WinSQLite3_Found TRUE)
|
|
|
|
get_filename_component(WindowsKitVersion "${LibWinSQLite3}/../../.." ABSOLUTE)
|
|
|
|
get_filename_component(WindowsKitVersion ${WindowsKitVersion} NAME)
|
|
|
|
set(WindowsKitInclude "${ProgramFiles_x86}/Windows Kits/10/Include/${WindowsKitVersion}/um")
|
|
|
|
message("Using WinSQLite3 from Windows SDK (${WindowsKitVersion}).")
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2024-12-21 15:38:37 +00:00
|
|
|
|
|
|
|
if (NOT WinSQLite3_Found)
|
|
|
|
if (USE_SYSTEM_SQLITE3)
|
|
|
|
message("Using existing SQLite3.")
|
|
|
|
find_package(SQLite3 REQUIRED)
|
|
|
|
else()
|
|
|
|
message("including sqlite3 to the build")
|
|
|
|
add_subdirectory(third-party/sqlite3)
|
|
|
|
endif()
|
|
|
|
endif()
|