Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1#[=[2This emulates Libtool to make sure Libtool and CMake agree on3the ABI version and file naming for shared libraries.5The `version_type` variable is set in `libtool.m4` (installed6by autoreconf into autotools-aux/m4/).7For the `major` and `versuffix` variables, see below "Calculate8the version variables" in `ltmain.sh` (installed by autoreconf9into autotools-aux/).10]=]11function(set_libtool_abi_version target current revision age)12if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$")13# version_type = linux | freebsd-elf14# major = $current - $age15# versuffix = $major.$age.$revision16math(EXPR _major "${current} - ${age}")17set_target_properties(${target} PROPERTIES18SOVERSION ${_major}19VERSION ${_major}.${age}.${revision}20)21elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")22# version_type = sunos23# major = $current24# versuffix = $current.$revision25set_target_properties(${target} PROPERTIES26SOVERSION ${current}27VERSION ${current}.${revision}28)29elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")30# version_type = sunos31# major = $current32# versuffix = $current.$revision33set_target_properties(${target} PROPERTIES34# OpenBSD has no `soname_spec` defined in `libtool.m4`.35VERSION ${current}.${revision}36)37elseif(APPLE)38# version_type = darwin39# major = $current - $age40math(EXPR _major "${current} - ${age}")41math(EXPR _compatibility "${current} + 1")42set_target_properties(${target} PROPERTIES43SOVERSION ${_major}44MACHO_COMPATIBILITY_VERSION ${_compatibility}45MACHO_CURRENT_VERSION ${_compatibility}.${revision}46)47elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")48# version_type = windows49# major = $current - $age50# versuffix = $major51math(EXPR _major "${current} - ${age}")52set(_windows_name "secp256k1")53if(MSVC)54set(_windows_name "${PROJECT_NAME}")55endif()56set_target_properties(${target} PROPERTIES57ARCHIVE_OUTPUT_NAME "${_windows_name}"58RUNTIME_OUTPUT_NAME "${_windows_name}-${_major}"59)60endif()61endfunction()
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.