Set CMAKE_INSTALL_RPATH for dynamic builds
When building dynamic libraries, set the RPATH so that binaries know where to find their libraries.
This commit is contained in:
parent
fe02a13685
commit
c833ca646f
1 changed files with 1 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ set( GRAPHENE_BUILD_DYNAMIC_LIBRARIES OFF CACHE BOOL
|
|||
"Whether to build dynamic libraries instead of static. Applies only to chain, db, protocol, net, and utilities" )
|
||||
if( GRAPHENE_BUILD_DYNAMIC_LIBRARIES )
|
||||
set( CMAKE_POSITION_INDEPENDENT_CODE ON )
|
||||
set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" )
|
||||
endif()
|
||||
set( FC_BUILD_DYNAMIC_LIBRARIES ${GRAPHENE_BUILD_DYNAMIC_LIBRARIES} CACHE BOOL "Whether FC should build as a dynamic library rather than static" )
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue