File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION  3.14 FATAL_ERROR)
2+ 
3+ project (CPMSqliteExample)
4+ 
5+ # ---- Dependencies ---- 
6+ 
7+ include (../../cmake/CPM.cmake)
8+ 
9+ # sqlite - You know it, you love it! 
10+ CPMAddPackage(
11+   NAME      sqlite
12+   URL      https://www.sqlite.org/2024/sqlite-amalgamation-3460000.zip
13+   URL_HASH SHA256=712a7d09d2a22652fb06a49af516e051979a3984adb067da86760e60ed51a7f5
14+   PATCHES
15+     sqlite.patch
16+ )
17+ 
18+ add_executable (CPMSqliteExample main.cpp)
19+ target_link_libraries (CPMSqliteExample sqlite)
Original file line number Diff line number Diff line change 1+ #include  < iostream> 
2+ #include  < sqlite3.h> 
3+ 
4+ 
5+ int  main (int ,char **) {
6+   std::cout << sqlite3_libversion () << " \n " 
7+   return  0 ;
8+ }
Original file line number Diff line number Diff line change 1+ diff -uN a/CMakeLists.txt b/CMakeLists.txt 
2+ --- a/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600 
3+ +++ b/CMakeLists.txt	2024-07-30 12:22:59.022590360 -0500 
4+ @@ -0,0 +1,7 @@ 
5+ + cmake_minimum_required(VERSION 3.11)
6+ + project(sqlite)
7+ + 
8+ + add_library(sqlite STATIC sqlite3.c  sqlite3.h  sqlite3ext.h)
9+ + target_include_directories(sqlite PUBLIC SYSTEM
10+ +   "${CMAKE_CURRENT_SOURCE_DIR}"
11+ + )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments