9 Commits

Author SHA1 Message Date
Hennadii Stepanov
116d2ab3df
cmake: Set ENVIRONMENT property for examples on Windows
This change simplifies running examples on Windows, because the DLL
must reside either in the same folder where the executable is or
somewhere in PATH.
2023-07-14 08:42:48 +01:00
Hennadii Stepanov
cef373997c
cmake, refactor: Use helper function instead of interface library
This change aims to simplify the following commit.
2023-07-14 08:41:26 +01:00
Hennadii Stepanov
ae9db95cea
build: Introduce SECP256K1_STATIC macro for Windows users
It is a non-Libtool-specific way to explicitly specify the user's
intention to consume a static `libseck256k1`.

This change allows to get rid of MSVC linker warnings LNK4217 and
LNK4286. Also, it makes possible to merge the `SECP256K1_API` and
`SECP256K1_API_VAR` into one.
2023-07-03 13:57:11 +01:00
Hennadii Stepanov
755629bc03
cmake: Use full signature of add_test() command
An executable target in the `COMMAND` option will automatically be
replaced by the location of the executable created at build time.

This change fixes tests for Windows binaries using Wine.
2023-04-29 09:49:25 +01:00
Tim Ruffing
6b7e5b717d
Merge bitcoin-core/secp256k1#1275: build: Fix C4005 "macro redefinition" MSVC warnings in examples
dc0657c7622f5a13afc3876eca7e2fc7cabb9a10 build: Fix C4005 "macro redefinition" MSVC warnings in examples (Hennadii Stepanov)

Pull request description:

  This PR:
  - fixes C4005 "macro redefinition" MSVC warnings in examples
  - removes warning suppressions in both build systems, Autotools-based and CMake-based ones

ACKs for top commit:
  real-or-random:
    utACK dc0657c7622f5a13afc3876eca7e2fc7cabb9a10

Tree-SHA512: fe3bb8f06b3ff1d51e5e20754a289e0e6b99ddf4c0bd4e6e4786e2558e71e043ab23ff7782a83a902df5db28d18ae65312674c373fdc49f5af252763a22bd0fb
2023-04-26 16:44:51 +01:00
Cory Fields
ef49a11d29 build: allow static or shared but not both 2023-04-17 16:25:27 +00:00
Hennadii Stepanov
dc0657c762
build: Fix C4005 "macro redefinition" MSVC warnings in examples 2023-04-13 12:23:30 +01:00
Hennadii Stepanov
8be82d4362
cmake: Rename project to "libsecp256k1" 2023-03-08 21:22:24 +00:00
Hennadii Stepanov
5468d70964
build: Add CMake-based build system
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-03-08 13:33:16 +00:00