nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

CMakeLists.txt (888B)


      1 # cmake -S . -B build
      2 # cd build
      3 # cmake --build . 
      4 # Pedro Vicente
      5 
      6 if (MSVC)
      7  cmake_minimum_required(VERSION 3.26)
      8 else()
      9  cmake_minimum_required(VERSION 3.15)
     10 endif() 
     11 set(CMAKE_BUILD_TYPE Debug)
     12 project (nostrdb C)
     13 
     14 #//////////////////////////
     15 # sources 
     16 #//////////////////////////
     17 
     18 set(src ${src})
     19 set(src ${src} nostrdb.c)
     20 set(src ${src} nostrdb.h)
     21 set(src ${src} cursor.h)
     22 set(src ${src} hex.h)
     23 set(src ${src} jsmn.h)
     24 
     25 add_library(libnostrdb ${src})
     26 
     27 #//////////////////////////
     28 # link with libraries
     29 # lib_dep contains a cascade definition of all the libraries needed to link
     30 #//////////////////////////
     31 
     32 set(lib_dep ${lib_dep})
     33 set(lib_dep ${lib_dep} libnostrdb)
     34 
     35 #//////////////////////////
     36 # executables
     37 #//////////////////////////
     38 
     39 add_executable(test test.c)
     40 add_executable(bench bench.c)
     41 target_link_libraries (test ${lib_dep})
     42 target_link_libraries (bench ${lib_dep})
     43 
     44 
     45 
     46