Skip to content

Commit d98abe4

Browse files
authored
Merge pull request #196 from pmienk/master
Adapt master to use libbitcoin-system in place of libbitcoin repository.
2 parents eba12c3 + 3ac823e commit d98abe4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+410
-386
lines changed

Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ doc_DATA = \
3232
# src/libbitcoin-protocol.la => ${libdir}
3333
#------------------------------------------------------------------------------
3434
lib_LTLIBRARIES = src/libbitcoin-protocol.la
35-
src_libbitcoin_protocol_la_CPPFLAGS = -I${srcdir}/include ${zmq_BUILD_CPPFLAGS} ${bitcoin_BUILD_CPPFLAGS}
36-
src_libbitcoin_protocol_la_LIBADD = ${zmq_LIBS} ${bitcoin_LIBS}
35+
src_libbitcoin_protocol_la_CPPFLAGS = -I${srcdir}/include ${zmq_BUILD_CPPFLAGS} ${bitcoin_system_BUILD_CPPFLAGS}
36+
src_libbitcoin_protocol_la_LIBADD = ${zmq_LIBS} ${bitcoin_system_LIBS}
3737
src_libbitcoin_protocol_la_SOURCES = \
3838
src/settings.cpp \
3939
src/zmq/authenticator.cpp \
@@ -54,8 +54,8 @@ if WITH_TESTS
5454
TESTS = libbitcoin-protocol-test_runner.sh
5555

5656
check_PROGRAMS = test/libbitcoin-protocol-test
57-
test_libbitcoin_protocol_test_CPPFLAGS = -I${srcdir}/include ${zmq_BUILD_CPPFLAGS} ${bitcoin_BUILD_CPPFLAGS}
58-
test_libbitcoin_protocol_test_LDADD = src/libbitcoin-protocol.la ${boost_unit_test_framework_LIBS} ${zmq_LIBS} ${bitcoin_LIBS}
57+
test_libbitcoin_protocol_test_CPPFLAGS = -I${srcdir}/include ${zmq_BUILD_CPPFLAGS} ${bitcoin_system_BUILD_CPPFLAGS}
58+
test_libbitcoin_protocol_test_LDADD = src/libbitcoin-protocol.la ${boost_unit_test_framework_LIBS} ${zmq_LIBS} ${bitcoin_system_LIBS}
5959
test_libbitcoin_protocol_test_SOURCES = \
6060
test/converter.cpp \
6161
test/main.cpp \

build.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ IF NOT EXIST "%nuget_pkg_path%" (
2323
)
2424
)
2525

26-
call :init libbitcoin libbitcoin master
26+
call :init libbitcoin libbitcoin-system master
2727
IF %ERRORLEVEL% NEQ 0 (
28-
call :failure "Initializing repository libbitcoin libbitcoin master failed."
28+
call :failure "Initializing repository libbitcoin libbitcoin-system master failed."
2929
exit /b 1
3030
)
3131
call :bld_repo libbitcoin-protocol

builds/cmake/CMakeLists.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,32 +107,32 @@ set( boost_LDFLAGS "-L${Boost_LIBRARY_DIR}" )
107107
#------------------------------------------------------------------------------
108108
find_package( Zmq 4.2.5 REQUIRED )
109109

110-
# Find bitcoin
110+
# Find bitcoin-system
111111
#------------------------------------------------------------------------------
112-
find_package( Bitcoin 4.0.0 REQUIRED )
112+
find_package( Bitcoin-System 4.0.0 REQUIRED )
113113

114114
# Define project common includes directories
115115
#------------------------------------------------------------------------------
116116
if (BUILD_SHARED_LIBS)
117117
include_directories( SYSTEM
118118
${zmq_INCLUDE_DIRS}
119-
${bitcoin_INCLUDE_DIRS} )
119+
${bitcoin_system_INCLUDE_DIRS} )
120120
else()
121121
include_directories( SYSTEM
122122
${zmq_STATIC_INCLUDE_DIRS}
123-
${bitcoin_STATIC_INCLUDE_DIRS} )
123+
${bitcoin_system_STATIC_INCLUDE_DIRS} )
124124
endif()
125125

126126
# Define project common library directories
127127
#------------------------------------------------------------------------------
128128
if (BUILD_SHARED_LIBS)
129129
link_directories(
130130
${zmq_LIBRARY_DIRS}
131-
${bitcoin_LIBRARY_DIRS} )
131+
${bitcoin_system_LIBRARY_DIRS} )
132132
else()
133133
link_directories(
134134
${zmq_STATIC_LIBRARY_DIRS}
135-
${bitcoin_STATIC_LIBRARY_DIRS} )
135+
${bitcoin_system_STATIC_LIBRARY_DIRS} )
136136
endif()
137137

138138
# Define project common libraries/linker flags.
@@ -142,13 +142,13 @@ if (BUILD_SHARED_LIBS)
142142
"-fstack-protector"
143143
"-fstack-protector-all"
144144
${zmq_LIBRARIES}
145-
${bitcoin_LIBRARIES} )
145+
${bitcoin_system_LIBRARIES} )
146146
else()
147147
link_libraries(
148148
"-fstack-protector"
149149
"-fstack-protector-all"
150150
${zmq_STATIC_LIBRARIES}
151-
${bitcoin_STATIC_LIBRARIES} )
151+
${bitcoin_system_STATIC_LIBRARIES} )
152152
endif()
153153

154154
# Define ${CANONICAL_LIB_NAME} project.
@@ -172,12 +172,12 @@ if (BUILD_SHARED_LIBS)
172172
target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE
173173
"../../include"
174174
${zmq_INCLUDE_DIRS}
175-
${bitcoin_INCLUDE_DIRS} )
175+
${bitcoin_system_INCLUDE_DIRS} )
176176
else()
177177
target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE
178178
"../../include"
179179
${zmq_STATIC_INCLUDE_DIRS}
180-
${bitcoin_STATIC_INCLUDE_DIRS} )
180+
${bitcoin_system_STATIC_INCLUDE_DIRS} )
181181
endif()
182182

183183
target_include_directories( ${CANONICAL_LIB_NAME} PUBLIC
@@ -188,11 +188,11 @@ target_include_directories( ${CANONICAL_LIB_NAME} PUBLIC
188188
if (BUILD_SHARED_LIBS)
189189
target_link_libraries( ${CANONICAL_LIB_NAME}
190190
${zmq_LIBRARIES}
191-
${bitcoin_LIBRARIES} )
191+
${bitcoin_system_LIBRARIES} )
192192
else()
193193
target_link_libraries( ${CANONICAL_LIB_NAME}
194194
${zmq_STATIC_LIBRARIES}
195-
${bitcoin_STATIC_LIBRARIES} )
195+
${bitcoin_system_STATIC_LIBRARIES} )
196196
endif()
197197

198198
# Define libbitcoin-protocol-test project.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
###############################################################################
2+
# Copyright (c) 2014-2018 libbitcoin-protocol developers (see COPYING).
3+
#
4+
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
5+
#
6+
###############################################################################
7+
# FindBitcoin
8+
#
9+
# Use this module by invoking find_package with the form::
10+
#
11+
# find_package( Bitcoin-System
12+
# [version] # Minimum version
13+
# [REQUIRED] # Fail with error if bitcoin is not found
14+
# )
15+
#
16+
# Defines the following for use:
17+
#
18+
# bitcoin_system_FOUND - true if headers and requested libraries were found
19+
# bitcoin_system_INCLUDE_DIRS - include directories for bitcoin-system libraries
20+
# bitcoin_system_LIBRARY_DIRS - link directories for bitcoin-system libraries
21+
# bitcoin_system_LIBRARIES - bitcoin-system libraries to be linked
22+
# bitcoin_system_PKG - bitcoin-system pkg-config package specification.
23+
#
24+
25+
if (MSVC)
26+
if ( Bitcoin-System_FIND_REQUIRED )
27+
set( _bitcoin_system_MSG_STATUS "SEND_ERROR" )
28+
else ()
29+
set( _bitcoin_system_MSG_STATUS "STATUS" )
30+
endif()
31+
32+
set( bitcoin_system_FOUND false )
33+
message( ${_bitcoin_system_MSG_STATUS} "MSVC environment detection for 'bitcoin-system' not currently supported." )
34+
else ()
35+
# required
36+
if ( Bitcoin-System_FIND_REQUIRED )
37+
set( _bitcoin_system_REQUIRED "REQUIRED" )
38+
endif()
39+
40+
# quiet
41+
if ( Bitcoin-System_FIND_QUIETLY )
42+
set( _bitcoin_system_QUIET "QUIET" )
43+
endif()
44+
45+
# modulespec
46+
if ( Bitcoin-System_FIND_VERSION_COUNT EQUAL 0 )
47+
set( _bitcoin_system_MODULE_SPEC "libbitcoin-system" )
48+
else ()
49+
if ( Bitcoin-System_FIND_VERSION_EXACT )
50+
set( _bitcoin_system_MODULE_SPEC_OP "=" )
51+
else ()
52+
set( _bitcoin_system_MODULE_SPEC_OP ">=" )
53+
endif()
54+
55+
set( _bitcoin_system_MODULE_SPEC "libbitcoin-system ${_bitcoin_system_MODULE_SPEC_OP} ${Bitcoin-System_FIND_VERSION}" )
56+
endif()
57+
58+
pkg_check_modules( bitcoin_system ${_bitcoin_system_REQUIRED} ${_bitcoin_system_QUIET} "${_bitcoin_system_MODULE_SPEC}" )
59+
set( bitcoin_system_PKG "${_bitcoin_system_MODULE_SPEC}" )
60+
endif()

builds/cmake/modules/FindBitcoin.cmake

Lines changed: 0 additions & 60 deletions
This file was deleted.

builds/msvc/vs2013/libbitcoin-protocol-test/libbitcoin-protocol-test.props

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
</ItemDefinitionGroup>
2222

2323
<!-- Dependencies -->
24-
24+
2525
<ImportGroup Label="PropertySheets">
26-
<Import Project="$(SolutionDir)libbitcoin.import.props" />
26+
<Import Project="$(SolutionDir)libbitcoin-system.import.props" />
2727
<Import Project="$(SolutionDir)libbitcoin-protocol.import.props" />
2828
</ImportGroup>
2929

@@ -35,32 +35,32 @@
3535
<Linkage-secp256k1>dynamic</Linkage-secp256k1>
3636
<Linkage-libzmq>dynamic</Linkage-libzmq>
3737
<!--<Linkage-protobuf>dynamic</Linkage-protobuf>-->
38-
<Linkage-libbitcoin>dynamic</Linkage-libbitcoin>
38+
<Linkage-libbitcoin-system>dynamic</Linkage-libbitcoin-system>
3939
<Linkage-libbitcoin-protocol>dynamic</Linkage-libbitcoin-protocol>
4040
</PropertyGroup>
4141
<PropertyGroup Condition="'$(DefaultLinkage)' == 'ltcg'">
4242
<Linkage-secp256k1>ltcg</Linkage-secp256k1>
4343
<Linkage-libzmq>ltcg</Linkage-libzmq>
4444
<!--<Linkage-protobuf>ltcg</Linkage-protobuf>-->
45-
<Linkage-libbitcoin>ltcg</Linkage-libbitcoin>
45+
<Linkage-libbitcoin-system>ltcg</Linkage-libbitcoin-system>
4646
<Linkage-libbitcoin-protocol>ltcg</Linkage-libbitcoin-protocol>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(DefaultLinkage)' == 'static'">
4949
<Linkage-secp256k1>static</Linkage-secp256k1>
5050
<Linkage-libzmq>static</Linkage-libzmq>
5151
<!--<Linkage-protobuf>static</Linkage-protobuf>-->
52-
<Linkage-libbitcoin>static</Linkage-libbitcoin>
52+
<Linkage-libbitcoin-system>static</Linkage-libbitcoin-system>
5353
<Linkage-libbitcoin-protocol>static</Linkage-libbitcoin-protocol>
5454
</PropertyGroup>
5555

5656
<!-- Messages -->
57-
57+
5858
<Target Name="LinkageInfo" BeforeTargets="PrepareForBuild">
59-
<Message Text="Linkage-secp256k1 : $(Linkage-secp256k1)" Importance="high"/>
60-
<Message Text="Linkage-libzmq : $(Linkage-libzmq)" Importance="high"/>
61-
<Message Text="Linkage-libbitcoin: $(Linkage-libbitcoin)" Importance="high"/>
59+
<Message Text="Linkage-secp256k1 : $(Linkage-secp256k1)" Importance="high"/>
60+
<Message Text="Linkage-libzmq : $(Linkage-libzmq)" Importance="high"/>
61+
<Message Text="Linkage-_-system : $(Linkage-libbitcoin-system)" Importance="high"/>
6262
<!--<Message Text="Linkage-protobuf : $(Linkage-protobuf)" Importance="high"/>-->
63-
<Message Text="Linkage-_protocol : $(Linkage-libbitcoin-protocol)" Importance="high"/>
63+
<Message Text="Linkage-_protocol : $(Linkage-libbitcoin-protocol)" Importance="high"/>
6464
</Target>
6565

6666
</Project>

builds/msvc/vs2013/libbitcoin-protocol/libbitcoin-protocol.props

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
77
<RunCodeAnalysis>false</RunCodeAnalysis>
88
</PropertyGroup>
9-
9+
1010
<!-- User Interface -->
11-
11+
1212
<ItemGroup Label="BuildOptionsExtension">
1313
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(ProjectName).xml" />
1414
</ItemGroup>
15-
15+
1616
<!-- Configuration -->
1717

1818
<ItemDefinitionGroup>
@@ -30,9 +30,9 @@
3030
</ItemDefinitionGroup>
3131

3232
<!-- Dependencies -->
33-
33+
3434
<ImportGroup Label="PropertySheets">
35-
<Import Project="$(SolutionDir)libbitcoin.import.props" />
35+
<Import Project="$(SolutionDir)libbitcoin-system.import.props" />
3636
</ImportGroup>
3737

3838
<PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
@@ -43,28 +43,28 @@
4343
<Linkage-secp256k1>dynamic</Linkage-secp256k1>
4444
<Linkage-libzmq>dynamic</Linkage-libzmq>
4545
<!--<Linkage-protobuf>dynamic</Linkage-protobuf>-->
46-
<Linkage-libbitcoin>dynamic</Linkage-libbitcoin>
46+
<Linkage-libbitcoin-system>dynamic</Linkage-libbitcoin-system>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(DefaultLinkage)' == 'ltcg'">
4949
<Linkage-secp256k1>ltcg</Linkage-secp256k1>
5050
<Linkage-libzmq>ltcg</Linkage-libzmq>
5151
<!--<Linkage-protobuf>ltcg</Linkage-protobuf>-->
52-
<Linkage-libbitcoin>ltcg</Linkage-libbitcoin>
52+
<Linkage-libbitcoin-system>ltcg</Linkage-libbitcoin-system>
5353
</PropertyGroup>
5454
<PropertyGroup Condition="'$(DefaultLinkage)' == 'static'">
5555
<Linkage-secp256k1>static</Linkage-secp256k1>
5656
<Linkage-libzmq>static</Linkage-libzmq>
5757
<!--<Linkage-protobuf>static</Linkage-protobuf>-->
58-
<Linkage-libbitcoin>static</Linkage-libbitcoin>
58+
<Linkage-libbitcoin-system>static</Linkage-libbitcoin-system>
5959
</PropertyGroup>
6060

6161
<!-- Messages -->
62-
62+
6363
<Target Name="LinkageInfo" BeforeTargets="PrepareForBuild">
64-
<Message Text="Linkage-secp256k1 : $(Linkage-secp256k1)" Importance="high"/>
65-
<Message Text="Linkage-libzmq : $(Linkage-libzmq)" Importance="high"/>
66-
<!--<Message Text="Linkage-protobuf : $(Linkage-protobuf)" Importance="high"/>-->
67-
<Message Text="Linkage-libbitcoin: $(Linkage-libbitcoin)" Importance="high"/>
64+
<Message Text="Linkage-secp256k1 : $(Linkage-secp256k1)" Importance="high"/>
65+
<Message Text="Linkage-libzmq : $(Linkage-libzmq)" Importance="high"/>
66+
<!--<Message Text="Linkage-protobuf : $(Linkage-protobuf)" Importance="high"/>-->
67+
<Message Text="Linkage-_system : $(Linkage-libbitcoin-system)" Importance="high"/>
6868
</Target>
6969

7070
</Project>

0 commit comments

Comments
 (0)