mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	Fixes: RIPD-1648 - use ExternalProject for snappy, lz4, SOCI, and sqlite3 - use FetchContent for NuDB - update SOCI from 79e222e3c2278e6108137a2d26d3689418b37544 to 3a1f602b3021b925d38828e3ff95f9e7f8887ff7 - update lz4 from c10863b98e1503af90616ae99725ecd120265dfb to v1.8.2 - update sqlite3 from 3.21 to 3.24 - update snappy from b02bfa754ebf27921d8da3bd2517eab445b84ff9 to 1.1.7 - update NuDB from 00adc6a4f16679a376f40c967f77dfa544c179c1 to 1.0.0
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
 | 
						|
#[=========================================================[
 | 
						|
  SQLITE doesn't provide build files in the
 | 
						|
  standard source-only distribution. So we wrote
 | 
						|
  a simple cmake file and we copy it to the
 | 
						|
  external project folder so that we can use
 | 
						|
  this file to build the lib with ExternalProject
 | 
						|
#]=========================================================]
 | 
						|
 | 
						|
add_library (sqlite3 STATIC sqlite3.c)
 | 
						|
#[=========================================================[
 | 
						|
   When compiled with SQLITE_THREADSAFE=1, SQLite operates
 | 
						|
   in serialized mode. In this mode, SQLite can be safely
 | 
						|
   used by multiple threads with no restriction.
 | 
						|
 | 
						|
   NOTE: This implies a global mutex!
 | 
						|
 | 
						|
   When compiled with SQLITE_THREADSAFE=2, SQLite can be
 | 
						|
   used in a multithreaded program so long as no two
 | 
						|
   threads attempt to use the same database connection at
 | 
						|
   the same time.
 | 
						|
 | 
						|
   NOTE: This is the preferred threading model, but not
 | 
						|
   currently enabled because we need to investigate our
 | 
						|
   use-model and concurrency requirements.
 | 
						|
 | 
						|
   TODO: consider whether any other options should be
 | 
						|
   used: https://www.sqlite.org/compile.html
 | 
						|
#]=========================================================]
 | 
						|
 | 
						|
target_compile_definitions (sqlite3
 | 
						|
  PRIVATE
 | 
						|
    SQLITE_THREADSAFE=1
 | 
						|
    HAVE_USLEEP=1)
 | 
						|
target_compile_options (sqlite3
 | 
						|
  PRIVATE
 | 
						|
    $<$<BOOL:${MSVC}>:
 | 
						|
      -wd4100
 | 
						|
      -wd4127
 | 
						|
      -wd4232
 | 
						|
      -wd4244
 | 
						|
      -wd4701
 | 
						|
      -wd4706
 | 
						|
      -wd4996
 | 
						|
    >
 | 
						|
    $<$<NOT:$<BOOL:${MSVC}>>:-Wno-array-bounds>)
 | 
						|
install (
 | 
						|
  TARGETS
 | 
						|
    sqlite3
 | 
						|
  LIBRARY DESTINATION lib
 | 
						|
  ARCHIVE DESTINATION lib
 | 
						|
  RUNTIME DESTINATION bin
 | 
						|
  INCLUDES DESTINATION include)
 | 
						|
install (
 | 
						|
  FILES
 | 
						|
    sqlite3.h
 | 
						|
    sqlite3ext.h
 | 
						|
  DESTINATION include)
 | 
						|
 | 
						|
 |