All RPATH setting have to be set before generation of any binary. Defining of CMAKE_INSTALL_RPATH is moved to separate file which is called from main CMakeLists.txt in the beginning, just after install_layout.cmake
		
			
				
	
	
		
			9 lines
		
	
	
		
			273 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			273 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
if(PACKAGE AND TARBALL)
 | 
						|
  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 | 
						|
  set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/maxscale" CACHE PATH "" FORCE)
 | 
						|
else()
 | 
						|
  set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/${MAXSCALE_LIBDIR})
 | 
						|
endif()
 | 
						|
 | 
						|
 |