1
- # Defines LocalCoin library target.
2
- project ( LocalCoin )
1
+ # Defines BitShares library target.
2
+ project ( BitShares )
3
3
cmake_minimum_required ( VERSION 2.8.12 )
4
4
5
- set ( BLOCKCHAIN_NAME "LocalCoin " )
5
+ set ( BLOCKCHAIN_NAME "BitShares " )
6
6
7
7
set ( CLI_CLIENT_EXECUTABLE_NAME graphene_client )
8
- set ( GUI_CLIENT_EXECUTABLE_NAME LocalCoin )
8
+ set ( GUI_CLIENT_EXECUTABLE_NAME BitShares )
9
9
set ( CUSTOM_URL_SCHEME "gcs" )
10
10
set ( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" )
11
11
@@ -32,6 +32,8 @@ if (USE_PCH)
32
32
include (cotire )
33
33
endif (USE_PCH )
34
34
35
+ option (USE_PROFILER "Build with GPROF support(Linux)." OFF )
36
+
35
37
IF ( NOT WIN32 )
36
38
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /libraries/fc/CMakeModules" )
37
39
ENDIF ( NOT WIN32 )
@@ -41,17 +43,14 @@ get_git_head_revision( GIT_REFSPEC GIT_SHA2 )
41
43
42
44
SET (BOOST_COMPONENTS )
43
45
LIST (APPEND BOOST_COMPONENTS thread
44
- iostreams
45
- date_time
46
- system
47
- filesystem
48
- program_options
49
- signals
50
- serialization
51
- chrono
52
- unit_test_framework
53
- context
54
- locale )
46
+ iostreams
47
+ date_time
48
+ system
49
+ filesystem
50
+ program_options
51
+ chrono
52
+ unit_test_framework
53
+ context )
55
54
SET ( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
56
55
57
56
IF ( WIN32 )
@@ -63,15 +62,15 @@ ENDIF(WIN32)
63
62
FIND_PACKAGE (Boost 1.57 REQUIRED COMPONENTS ${BOOST_COMPONENTS} )
64
63
# For Boost 1.53 on windows, coroutine was not in BOOST_LIBRARYDIR and do not need it to build, but if boost versin >= 1.54, find coroutine otherwise will cause link errors
65
64
IF (NOT "${Boost_VERSION} " MATCHES "1.53(.*)" )
66
- SET (BOOST_LIBRARIES_TEMP ${Boost_LIBRARIES} )
67
- FIND_PACKAGE (Boost 1.54 REQUIRED COMPONENTS coroutine )
68
- LIST (APPEND BOOST_COMPONENTS coroutine )
69
- SET (Boost_LIBRARIES ${BOOST_LIBRARIES_TEMP} ${Boost_LIBRARIES} )
65
+ SET (BOOST_LIBRARIES_TEMP ${Boost_LIBRARIES} )
66
+ FIND_PACKAGE (Boost 1.54 REQUIRED COMPONENTS coroutine )
67
+ LIST (APPEND BOOST_COMPONENTS coroutine )
68
+ SET (Boost_LIBRARIES ${BOOST_LIBRARIES_TEMP} ${Boost_LIBRARIES} )
70
69
ENDIF ()
71
70
72
71
if ( WIN32 )
73
72
74
- message ( STATUS "Configuring LocalCoin on WIN32" )
73
+ message ( STATUS "Configuring BitShares on WIN32" )
75
74
set ( DB_VERSION 60 )
76
75
set ( BDB_STATIC_LIBS 1 )
77
76
@@ -81,14 +80,14 @@ if( WIN32 )
81
80
set (CRYPTO_LIB )
82
81
83
82
if ( MSVC )
84
- #looks like this flag can have different default on some machines.
85
- SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO" )
86
- SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO" )
87
-
88
- # Probably cmake has a bug and vcxproj generated for executable in Debug conf. has disabled debug info
89
- set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG" )
83
+ #looks like this flag can have different default on some machines.
84
+ SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO" )
85
+ SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO" )
90
86
87
+ # Probably cmake has a bug and vcxproj generated for executable in Debug conf. has disabled debug info
88
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG" )
91
89
endif ( MSVC )
90
+
92
91
# On windows tcl should be installed to the directory pointed by setenv.bat script
93
92
SET (TCL_INCLUDE_PATH $ENV{TCL_ROOT} /include )
94
93
MESSAGE (STATUS "tcl INCLUDE PATH: ${TCL_INCLUDE_PATH} " )
@@ -108,12 +107,15 @@ else( WIN32 ) # Apple AND Linux
108
107
109
108
if ( APPLE )
110
109
# Apple Specific Options Here
111
- message ( STATUS "Configuring LocalCoin on OS X" )
110
+ message ( STATUS "Configuring BitShares on OS X" )
112
111
set ( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -stdlib=libc++ -Wall" )
113
112
else ( APPLE )
114
113
# Linux Specific Options Here
115
- message ( STATUS "Configuring LocalCoin on Linux" )
114
+ message ( STATUS "Configuring BitShares on Linux" )
116
115
set ( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -Wall" )
116
+ if (USE_PROFILER )
117
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg" )
118
+ endif ( USE_PROFILER )
117
119
set ( rt_library rt )
118
120
set ( pthread_library pthread )
119
121
if ( NOT DEFINED crypto_library )
@@ -146,7 +148,7 @@ else( WIN32 ) # Apple AND Linux
146
148
147
149
endif ( WIN32 )
148
150
149
- set (ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build LocalCoin for code coverage analysis" )
151
+ set (ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build BitShares for code coverage analysis" )
150
152
151
153
if (ENABLE_COVERAGE_TESTING )
152
154
SET (CMAKE_CXX_FLAGS "--coverage ${CMAKE_CXX_FLAGS} " )
@@ -176,18 +178,18 @@ set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
176
178
set (CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR} " )
177
179
set (CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH} " )
178
180
set (CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR} .${CPACK_PACKAGE_VERSION_MINOR} .${CPACK_PACKAGE_VERSION_PATCH} " )
179
- set (CPACK_PACKAGE_DESCRIPTION "A client for the LocalCoin network" )
180
- set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "A client for the LocalCoin network" )
181
+ set (CPACK_PACKAGE_DESCRIPTION "A client for the BitShares network" )
182
+ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "A client for the BitShares network" )
181
183
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR} /LICENSE.md" )
182
- set (CPACK_PACKAGE_INSTALL_DIRECTORY "LocalCoin ${CPACK_PACKAGE_VERSION} " )
184
+ set (CPACK_PACKAGE_INSTALL_DIRECTORY "BitShares ${CPACK_PACKAGE_VERSION} " )
183
185
184
186
if (WIN32 )
185
187
SET (CPACK_GENERATOR "ZIP;NSIS" )
186
- set (CPACK_PACKAGE_NAME "LocalCoin " ) # override above
188
+ set (CPACK_PACKAGE_NAME "BitShares " ) # override above
187
189
set (CPACK_NSIS_EXECUTABLES_DIRECTORY . )
188
- set (CPACK_NSIS_PACKAGE_NAME "LocalCoin v${CPACK_PACKAGE_VERSION} " )
190
+ set (CPACK_NSIS_PACKAGE_NAME "BitShares v${CPACK_PACKAGE_VERSION} " )
189
191
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME} " )
190
- set (CPACK_NSIS_DEFINES " !define MUI_STARTMENUPAGE_DEFAULTFOLDER \\\" LocalCoin \\\" " )
192
+ set (CPACK_NSIS_DEFINES " !define MUI_STARTMENUPAGE_DEFAULTFOLDER \\\" BitShares \\\" " )
191
193
# it seems like windows zip files usually don't have a single directory inside them, unix tgz frequently do
192
194
SET (CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0 )
193
195
@@ -205,3 +207,7 @@ endif(LINUX)
205
207
206
208
include (CPack )
207
209
endif (ENABLE_INSTALLER )
210
+
211
+ MESSAGE ( STATUS "" )
212
+ MESSAGE ( STATUS "PROFILER: ${USE_PROFILER} " )
213
+ MESSAGE ( STATUS "" )
0 commit comments