kgg-dec/cmake/FindWinSQLite3.cmake

15 lines
709 B
CMake

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 ()