mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-28 22:45:49 +00:00
fix(libxrpl): change library names in Conan recipe (#4831)
Use consistent platform-agnostic library names on all platforms. Fix an issue that prevents dependents like validator-keys-tool from linking to libxrpl on Windows. It is bad practice to change the binary base name depending on the platform. CMake already manipulates the base name into a final name that fits the conventions of the platform. Linkers accept base names on the command line and then look for conventional names on disk.
This commit is contained in:
@@ -148,9 +148,9 @@ class Xrpl(ConanFile):
|
|||||||
def package_info(self):
|
def package_info(self):
|
||||||
libxrpl = self.cpp_info.components['libxrpl']
|
libxrpl = self.cpp_info.components['libxrpl']
|
||||||
libxrpl.libs = [
|
libxrpl.libs = [
|
||||||
'libxrpl_core.a',
|
'xrpl_core',
|
||||||
'libed25519.a',
|
'ed25519',
|
||||||
'libsecp256k1.a',
|
'secp256k1',
|
||||||
]
|
]
|
||||||
# TODO: Fix the protobufs to include each other relative to
|
# TODO: Fix the protobufs to include each other relative to
|
||||||
# `include/`, not `include/ripple/proto/`.
|
# `include/`, not `include/ripple/proto/`.
|
||||||
|
|||||||
@@ -64,9 +64,16 @@ elseif(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
set(${PROJECT_NAME}_windows "secp256k1")
|
set(${PROJECT_NAME}_windows "secp256k1")
|
||||||
if(MSVC)
|
# This step is commented out from the original. It is bad practice to change
|
||||||
set(${PROJECT_NAME}_windows "${PROJECT_NAME}")
|
# the binary base name depending on the platform. CMake already manipulates
|
||||||
endif()
|
# the base name into a final name that fits the conventions of the platform.
|
||||||
|
# Linkers accept base names on the command line and then look for
|
||||||
|
# conventional names on disk. This way, developers can use base names
|
||||||
|
# everywhere (in the CMake and Conan they write) and the tools will do the
|
||||||
|
# right thing.
|
||||||
|
# if(MSVC)
|
||||||
|
# set(${PROJECT_NAME}_windows "${PROJECT_NAME}")
|
||||||
|
# endif()
|
||||||
set_target_properties(secp256k1 PROPERTIES
|
set_target_properties(secp256k1 PROPERTIES
|
||||||
ARCHIVE_OUTPUT_NAME "${${PROJECT_NAME}_windows}"
|
ARCHIVE_OUTPUT_NAME "${${PROJECT_NAME}_windows}"
|
||||||
RUNTIME_OUTPUT_NAME "${${PROJECT_NAME}_windows}-${${PROJECT_NAME}_soversion}"
|
RUNTIME_OUTPUT_NAME "${${PROJECT_NAME}_windows}-${${PROJECT_NAME}_soversion}"
|
||||||
|
|||||||
Reference in New Issue
Block a user