mirror of
				https://git.libssh.org/projects/libssh.git
				synced 2025-11-03 21:53:14 +03:00 
			
		
		
		
	This commit fixes a couple issues in the CMake configuration files and uses native features from CMake: * libssh-build-tree-settings.cmake is deleted. There was a typo that made this file unusable, anyway. * use the macros available in CMakePackageConfigHelpers.cmake to generate the version file and check that the files exist * Remove the LIBSSH_THREADS_LIBRARY variable, it used the non-existent LIBSSH_THREADS_LIBRARY_NAME variable. * Fix the in tree build. libssh can be used uninstalled again. Test plan: The values were tested after installing the new files and also without running 'make install'. Signed-off-by: Christophe Giboudeaux <christophe@krop.fr>
		
			
				
	
	
		
			16 lines
		
	
	
		
			566 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			566 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
@PACKAGE_INIT@
 | 
						|
 | 
						|
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/CMakeCache.txt")
 | 
						|
    # In tree build
 | 
						|
    set_and_check(LIBSSH_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include")
 | 
						|
    set_and_check(LIBSSH_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/@LIBSSH_LIBRARY_NAME@")
 | 
						|
else()
 | 
						|
    set_and_check(LIBSSH_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
 | 
						|
    set_and_check(LIBSSH_LIBRARIES "@PACKAGE_LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@")
 | 
						|
endif()
 | 
						|
 | 
						|
# For backward compatibility
 | 
						|
set(LIBSSH_LIBRARY ${LIBSSH_LIBRARIES})
 | 
						|
 | 
						|
mark_as_advanced(LIBSSH_LIBRARIES LIBSSH_LIBRARY LIBSSH_INCLUDE_DIR)
 |