@@ -13,49 +13,98 @@ endif(MSVC)
1313set_source_files_properties ("${CMAKE_CURRENT_BINARY_DIR } /include/steemit/chain/hardfork.hpp" PROPERTIES GENERATED TRUE )
1414
1515## SORT .cpp by most likely to change / break compile
16- add_library (golos_chain
17-
18- # As database takes the longest to compile, start it first
19- database.cpp
20- fork_database.cpp
21-
22- steem_evaluator.cpp
23-
24- steem_objects.cpp
25- shared_authority.cpp
26- block_log.cpp
27-
28- include /steemit/chain/account_object.hpp
29- include /steemit/chain/block_log.hpp
30- include /steemit/chain/block_summary_object.hpp
31- include /steemit/chain/comment_object.hpp
32- include /steemit/chain/compound.hpp
33- include /steemit/chain/custom_operation_interpreter.hpp
34- include /steemit/chain/database.hpp
35- include /steemit/chain/database_exceptions.hpp
36- include /steemit/chain/db_with.hpp
37- include /steemit/chain/evaluator.hpp
38- include /steemit/chain/evaluator_registry.hpp
39- include /steemit/chain/fork_database.hpp
40- include /steemit/chain/generic_custom_operation_interpreter.hpp
41- include /steemit/chain/global_property_object.hpp
42- include /steemit/chain/history_object.hpp
43- include /steemit/chain/immutable_chain_parameters.hpp
44- include /steemit/chain/index.hpp
45- include /steemit/chain/node_property_object.hpp
46- include /steemit/chain/operation_notification.hpp
47- include /steemit/chain/shared_authority.hpp
48- include /steemit/chain/shared_db_merkle.hpp
49- include /steemit/chain/snapshot_state.hpp
50- include /steemit/chain/steem_evaluator.hpp
51- include /steemit/chain/steem_object_types.hpp
52- include /steemit/chain/steem_objects.hpp
53- include /steemit/chain/transaction_object.hpp
54- include /steemit/chain/witness_objects.hpp
55-
56- ${hardfork_hpp_file}
57- "${CMAKE_CURRENT_BINARY_DIR } /include/steemit/chain/hardfork.hpp"
58- )
16+
17+ if (BUILD_SHARED_LIBRARIES)
18+ add_library (golos_chain SHARED
19+
20+ # As database takes the longest to compile, start it first
21+ database.cpp
22+ fork_database.cpp
23+
24+ steem_evaluator.cpp
25+
26+ steem_objects.cpp
27+ shared_authority.cpp
28+ # transaction_object.cpp
29+ block_log.cpp
30+
31+ include /steemit/chain/account_object.hpp
32+ include /steemit/chain/block_log.hpp
33+ include /steemit/chain/block_summary_object.hpp
34+ include /steemit/chain/comment_object.hpp
35+ include /steemit/chain/compound.hpp
36+ include /steemit/chain/custom_operation_interpreter.hpp
37+ include /steemit/chain/database.hpp
38+ include /steemit/chain/database_exceptions.hpp
39+ include /steemit/chain/db_with.hpp
40+ include /steemit/chain/evaluator.hpp
41+ include /steemit/chain/evaluator_registry.hpp
42+ include /steemit/chain/fork_database.hpp
43+ include /steemit/chain/generic_custom_operation_interpreter.hpp
44+ include /steemit/chain/global_property_object.hpp
45+ include /steemit/chain/history_object.hpp
46+ include /steemit/chain/immutable_chain_parameters.hpp
47+ include /steemit/chain/index.hpp
48+ include /steemit/chain/node_property_object.hpp
49+ include /steemit/chain/operation_notification.hpp
50+ include /steemit/chain/shared_authority.hpp
51+ include /steemit/chain/shared_db_merkle.hpp
52+ include /steemit/chain/snapshot_state.hpp
53+ include /steemit/chain/steem_evaluator.hpp
54+ include /steemit/chain/steem_object_types.hpp
55+ include /steemit/chain/steem_objects.hpp
56+ include /steemit/chain/transaction_object.hpp
57+ include /steemit/chain/witness_objects.hpp
58+
59+ ${hardfork_hpp_file}
60+ "${CMAKE_CURRENT_BINARY_DIR } /include/steemit/chain/hardfork.hpp"
61+ )
62+ else ()
63+ add_library (golos_chain STATIC
64+
65+ # As database takes the longest to compile, start it first
66+ database.cpp
67+ fork_database.cpp
68+
69+ steem_evaluator.cpp
70+
71+ steem_objects.cpp
72+ shared_authority.cpp
73+ # transaction_object.cpp
74+ block_log.cpp
75+
76+ include /steemit/chain/account_object.hpp
77+ include /steemit/chain/block_log.hpp
78+ include /steemit/chain/block_summary_object.hpp
79+ include /steemit/chain/comment_object.hpp
80+ include /steemit/chain/compound.hpp
81+ include /steemit/chain/custom_operation_interpreter.hpp
82+ include /steemit/chain/database.hpp
83+ include /steemit/chain/database_exceptions.hpp
84+ include /steemit/chain/db_with.hpp
85+ include /steemit/chain/evaluator.hpp
86+ include /steemit/chain/evaluator_registry.hpp
87+ include /steemit/chain/fork_database.hpp
88+ include /steemit/chain/generic_custom_operation_interpreter.hpp
89+ include /steemit/chain/global_property_object.hpp
90+ include /steemit/chain/history_object.hpp
91+ include /steemit/chain/immutable_chain_parameters.hpp
92+ include /steemit/chain/index.hpp
93+ include /steemit/chain/node_property_object.hpp
94+ include /steemit/chain/operation_notification.hpp
95+ include /steemit/chain/shared_authority.hpp
96+ include /steemit/chain/shared_db_merkle.hpp
97+ include /steemit/chain/snapshot_state.hpp
98+ include /steemit/chain/steem_evaluator.hpp
99+ include /steemit/chain/steem_object_types.hpp
100+ include /steemit/chain/steem_objects.hpp
101+ include /steemit/chain/transaction_object.hpp
102+ include /steemit/chain/witness_objects.hpp
103+
104+ ${hardfork_hpp_file}
105+ "${CMAKE_CURRENT_BINARY_DIR } /include/steemit/chain/hardfork.hpp"
106+ )
107+ endif ()
59108
60109add_dependencies (golos_chain golos_protocol build_hardfork_hpp )
61110target_link_libraries (golos_chain golos_protocol fc chainbase graphene_schema ${PATCH_MERGE_LIB} )
0 commit comments