mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	 b80a8e2c16
			
		
	
	b80a8e2c16
	
	
	
		
			
			Ensure bundled libraries and include directories are always searched first before any others. This will provide a more consistent experience as the search order of the builtin find_ functions can vary depending on system. This should make the build process faster when building with bundled deps as we limit the search to only the .deps directory. Separating the search between .deps and everything makes debugging find_-related problems simpler if you need to check how dependencies are found. For libraries, we divide the search process into the following order: 1. Only search in .deps directory and only search for static libraries. 2. Only search in .deps directory and search for all libraries. 3. Search everywhere and search for all libraries. Make an exception for FindLibintl.cmake as changing the search order seems to break some tests on macos.
		
			
				
	
	
		
			15 lines
		
	
	
		
			562 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			562 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| # TODO(dundargoc): FindIconv is shipped by default on cmake version 3.11+. This
 | |
| # file can be removed once we decide to upgrade minimum cmake version.
 | |
| 
 | |
| find_path2(ICONV_INCLUDE_DIR NAMES iconv.h)
 | |
| find_library2(ICONV_LIBRARY NAMES iconv libiconv)
 | |
| find_package_handle_standard_args(Iconv DEFAULT_MSG
 | |
|   ICONV_INCLUDE_DIR)
 | |
| mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIBRARY)
 | |
| 
 | |
| add_library(iconv INTERFACE)
 | |
| target_include_directories(iconv SYSTEM BEFORE INTERFACE ${ICONV_INCLUDE_DIR})
 | |
| if(ICONV_LIBRARY)
 | |
|   target_link_libraries(iconv INTERFACE ${ICONV_LIBRARY})
 | |
| endif()
 |