cmake: Set `ENVIRONMENT` property for examples on Windows #1290

pull hebasto wants to merge 3 commits into bitcoin-core:master from hebasto:230429-msvc-path changing 2 files +23 −18
  1. hebasto commented at 9:27 AM on April 29, 2023: member

    This PR simplifies running examples on Windows, because the DLL must reside either in the same folder where the executable is or somewhere in PATH.

    It is an alternative to #1233.

  2. hebasto force-pushed on Apr 29, 2023
  3. hebasto marked this as ready for review on Apr 29, 2023
  4. hebasto commented at 3:40 PM on April 29, 2023: member

    Rebased and undrafted.

  5. real-or-random commented at 5:36 PM on May 11, 2023: contributor

    Concept ACK

  6. real-or-random added the label build on May 11, 2023
  7. hebasto force-pushed on Jul 13, 2023
  8. hebasto commented at 4:07 PM on July 13, 2023: member

    Rebased 7a8b25034091a8ba2130712c0fe8f13bbaf15d8e -> 5a6f63a6e0d9d4168d7c893e2335fccaa99ea4e3 (pr1290.02 -> pr1290.03) due to the conflict with #1367.

  9. in examples/CMakeLists.txt:14 in 5a6f63a6e0 outdated
      17 | +    $<$<PLATFORM_ID:Windows>:bcrypt>
      18 | +  )
      19 | +  set(test_name ${name}_example)
      20 | +  add_test(NAME ${test_name} COMMAND ${target_name})
      21 | +  if(BUILD_SHARED_LIBS AND MSVC)
      22 | +    # The DLL must resides either in the same folder where the executable is
    


    real-or-random commented at 7:17 AM on July 14, 2023:
        # The DLL must reside either in the same folder where the executable is
    
  10. real-or-random commented at 7:17 AM on July 14, 2023: contributor

    utACK mod nit

  11. cmake, refactor: Use helper function instead of interface library
    This change aims to simplify the following commit.
    cef373997c
  12. 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.
    116d2ab3df
  13. ci: Drop no longer needed `PATH` variable update on Windows 175db31149
  14. hebasto force-pushed on Jul 14, 2023
  15. hebasto commented at 7:46 AM on July 14, 2023: member

    Updated 5a6f63a6e0d9d4168d7c893e2335fccaa99ea4e3 -> 175db31149fff4b3dc3d3dab021f289d7e98381c (pr1290.03 -> pr1290.04, diff). @real-or-random's comment has been addressed.

  16. real-or-random approved
  17. real-or-random commented at 7:46 AM on July 14, 2023: contributor

    utACK 175db31149fff4b3dc3d3dab021f289d7e98381c

  18. real-or-random commented at 9:52 PM on July 20, 2023: contributor

    @theuni Would you like to review this?

  19. real-or-random merged this on Aug 3, 2023
  20. real-or-random closed this on Aug 3, 2023

  21. real-or-random commented at 1:15 PM on August 3, 2023: contributor

    Merging, but happy to see any post-merge review.

  22. hebasto deleted the branch on Aug 3, 2023
  23. sipa referenced this in commit c0da4f60e2 on Sep 4, 2023
  24. Retropex referenced this in commit 5f62ed90f6 on Oct 4, 2023
  25. real-or-random referenced this in commit d575ef9aca on Oct 12, 2023
  26. janus referenced this in commit 1097330147 on Apr 1, 2024
  27. hebasto referenced this in commit b6de625950 on May 11, 2024
  28. real-or-random referenced this in commit e59158b6eb on Oct 15, 2024
  29. delta1 referenced this in commit 6089844b3c on Apr 2, 2025
  30. div72 referenced this in commit af627d47c3 on Apr 12, 2025
  31. str4d referenced this in commit b9e749419a on Jun 4, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:52 UTC