diff --git a/cmake/modules/InstallationHelper.cmake b/cmake/modules/InstallationHelper.cmake --- a/cmake/modules/InstallationHelper.cmake +++ b/cmake/modules/InstallationHelper.cmake @@ -32,7 +32,7 @@ endif() if(ARG_PUBLIC_HEADER) - list(APPEND _properties PUBLIC_HEADER ${ARG_PUBLIC_HEADER}) + set_property(TARGET ${_shared_name} PROPERTY PUBLIC_HEADER ${ARG_PUBLIC_HEADER}) endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -42,22 +42,22 @@ # On platforms other than linux, only the major version (0) is used. # Replace the VERSION line with the statement below to set the # correct version: - # set(_properties VERSION "${bitcoin-abc_VERSION}") - list(APPEND _properties VERSION "${bitcoin-abc_VERSION_MAJOR}.0.0") + # set(_properties VERSION "${CMAKE_PROJECT_VERSION}") + list(APPEND _properties VERSION "${CMAKE_PROJECT_VERSION_MAJOR}.0.0") else() - list(APPEND _properties VERSION "${bitcoin-abc_VERSION_MAJOR}") + list(APPEND _properties VERSION "${CMAKE_PROJECT_VERSION_MAJOR}") endif() # For autotools compatibility, rename the library to ${OUTPUT_NAME}-0.dll if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - list(APPEND _properties OUTPUT_NAME "${NAME}-${bitcoin-abc_VERSION_MAJOR}") + list(APPEND _properties OUTPUT_NAME "${NAME}-${CMAKE_PROJECT_VERSION_MAJOR}") # DLL_EXPORT is defined by libtool, and is expected by some sources. target_compile_definitions(${_shared_name} PRIVATE DLL_EXPORT) else() list(APPEND _properties OUTPUT_NAME "${NAME}") endif() - list(APPEND _properties SOVERSION "${bitcoin-abc_VERSION_MAJOR}") + list(APPEND _properties SOVERSION "${CMAKE_PROJECT_VERSION_MAJOR}") set_target_properties(${_shared_name} PROPERTIES ${_properties})