damus-io / nostrdb

The unfairly fast embedded nostr database backed by lmdb
Other
87 stars 15 forks source link

Add secp256k1 as dependency library #2

Closed pedro-vicente closed 4 months ago

pedro-vicente commented 1 year ago

Add secp256k1 as dependency library Add target configurator to generate 'config.h' Note: renamed target 'bench' to 'benchmark', to avoid conflict with target 'bench' of secp256k1

jb55 commented 1 year ago

great! thank you

pedro-vicente commented 1 year ago

The cmake usage is

cmake -S . -B build 
cd build
cmake --build .

and this builds target 'configurator' needed to generate 'config.h'

Consolidate compiler generated dependencies of target configurator
[  4%] Linking C executable configurator

But for some reason, on Mac, this target is not built So, a solution , is to call it manually , like this

cmake -S . -B build 
cd build
cmake --build . --target configurator
cmake --build .

This could be put on a README.md file

jb55 commented 11 months ago

Looks like all these patches touch the same file, let's just squash them together

Also, I added LMDB, that might need support as well.

On Wed, Jul 26, 2023 at 09:17:58PM -0400, pvn wrote:

Closes: https://github.com/damus-io/nostrdb/pull/2

CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt index a65265b..35c2d8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@

cmake -S . -B build

cd build

+# cmake --build . --target configurator

cmake --build .

Pedro Vicente

@@ -13,7 +14,6 @@ project (nostrdb C)

set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") set(BUILD_SHARED_LIBS OFF) -set(CMAKE_EXE_LINKER_FLAGS "-static")

include_directories(${CMAKE_SOURCE_DIR}/deps/secp256k1/include) add_subdirectory(${CMAKE_SOURCE_DIR}/deps/secp256k1)

pedro-vicente commented 11 months ago

Looks like all these patches touch the same file, let's just squash them together

Yes, it is only 1 file for now, CMakeLists.txt, it seems I did changes in several commits. I am not that good with GitHub , it seems if you merge the pull request, that's all that is needed to merge.

Or do I have to do something on my end?

Thanks