-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace readline library, Issue 673 #685
Changes from 1 commit
345f157
38376b2
9efb656
0465ca6
6580cbf
51ac5b0
f14c8bc
3d1d863
af3bc7a
26659fb
e789b35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,20 +9,19 @@ if( GPERFTOOLS_FOUND ) | |
list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc ) | ||
endif() | ||
|
||
find_package( Editline ) | ||
if ( EDITLINE_FOUND ) | ||
message ( STATUS "Found Editline; compiling cli_wallet with Editline" ) | ||
list ( APPEND PLATFORM_SPECIFIC_LIBS editline ) | ||
add_library (editline STATIC IMPORTED ) | ||
set_target_properties ( editline PROPERTIES IMPORTED_LOCATION ${Editline_LIBRARY} ) | ||
endif() | ||
|
||
|
||
target_link_libraries( cli_wallet | ||
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ) | ||
|
||
if(MSVC) | ||
target_link_libraries( cli_wallet | ||
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ) | ||
set_source_files_properties( main.cpp PROPERTIES COMPILE_FLAGS "/bigobj" ) | ||
else (MSVC) | ||
add_library(editline STATIC IMPORTED) | ||
set_target_properties(editline PROPERTIES | ||
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/libraries/fc/vendor/editline/src/project_editline-build/src/.libs/libeditline.a" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not correct. Lib file should be "BINARY_DIR" based. I think my patch mentioned in a previous comment in this PR would work better (it didn't handle MSVC though). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I misread your patch several comments above. It is better than what I've done. I'm stealing it. |
||
INTERFACE_INCLUDE_DIRECTORIES "$(CMAKE_SOURCE_DIR}/libraries/fc/vendor/editline/include") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not hard code "fc/vendor/editline" here since the directory structure should be decided by fc. Actually we don't need to specify this parameter here, since cli_wallet doesn't directly include the header files. Again, my patch mentioned above works. |
||
|
||
target_link_libraries( cli_wallet | ||
PRIVATE graphene_app editline graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ) | ||
|
||
endif(MSVC) | ||
|
||
install( TARGETS | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't duplicate this line, instead, should make use of
PLATFORM_SPECIFIC_LIBS
. E.G.By the way, is it sure that editline doesn't work under Windows? If it would work, we don't need this check at all.