add RPATH for compiled tools to find the libddsc.so (#153)
* add RPATH for compiled tools to find the libddsc.so Signed-off-by: YuSheng <hello@cwyark.me>
This commit is contained in:
		
							parent
							
								
									b686ba858c
								
							
						
					
					
						commit
						ca35c7afb2
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -154,6 +154,11 @@ endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
include(GNUInstallDirs)
 | 
					include(GNUInstallDirs)
 | 
				
			||||||
include(AnalyzeBuild)
 | 
					include(AnalyzeBuild)
 | 
				
			||||||
 | 
					if(APPLE)
 | 
				
			||||||
 | 
					  set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}")
 | 
				
			||||||
 | 
					else()
 | 
				
			||||||
 | 
					  set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
# Include Coverage before CTest so that COVERAGE_COMMAND can be modified
 | 
					# Include Coverage before CTest so that COVERAGE_COMMAND can be modified
 | 
				
			||||||
# in the Coverage module should that ever be necessary.
 | 
					# in the Coverage module should that ever be necessary.
 | 
				
			||||||
include(Coverage)
 | 
					include(Coverage)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,7 @@
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
add_executable(pubsub pubsub.c common.c testtype.c porting.c)
 | 
					add_executable(pubsub pubsub.c common.c testtype.c porting.c)
 | 
				
			||||||
target_link_libraries(pubsub ddsc)
 | 
					target_link_libraries(pubsub ddsc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(WIN32)
 | 
					if(WIN32)
 | 
				
			||||||
  target_compile_definitions(pubsub PRIVATE _CRT_SECURE_NO_WARNINGS)
 | 
					  target_compile_definitions(pubsub PRIVATE _CRT_SECURE_NO_WARNINGS)
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue