cmake: Build secp256k1 only when required

This commit is contained in:
Hennadii Stepanov 2024-11-23 15:31:39 +00:00
parent 76a3a540a4
commit ab5c63edcc
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -73,6 +73,9 @@ if(DEFINED ENV{CFLAGS})
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
add_subdirectory(secp256k1)
set_target_properties(secp256k1 PROPERTIES
EXCLUDE_FROM_ALL TRUE
)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
string(APPEND CMAKE_C_COMPILE_OBJECT " ${APPEND_CPPFLAGS} ${APPEND_CFLAGS}")