mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 09:44:35 +00:00 
			
		
		
		
	look for clock_gettime() in libc first, then in librt if not found.
This commit is contained in:
		
				
					committed by
					
						
						Sam Lantinga
					
				
			
			
				
	
			
			
			
						parent
						
							9370f9ca85
						
					
				
				
					commit
					c6792f78df
				
			@@ -1612,14 +1612,14 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
 | 
			
		||||
  CheckPTHREAD()
 | 
			
		||||
 | 
			
		||||
  if(SDL_CLOCK_GETTIME)
 | 
			
		||||
    check_library_exists(rt clock_gettime "" FOUND_CLOCK_GETTIME_LIBRT)
 | 
			
		||||
    if(FOUND_CLOCK_GETTIME_LIBRT)
 | 
			
		||||
      list(APPEND SDL_EXTRA_LIBS rt)
 | 
			
		||||
      set(HAVE_CLOCK_GETTIME 1)
 | 
			
		||||
    else()
 | 
			
		||||
    check_library_exists(c clock_gettime "" FOUND_CLOCK_GETTIME_LIBC)
 | 
			
		||||
    if(FOUND_CLOCK_GETTIME_LIBC)
 | 
			
		||||
      set(HAVE_CLOCK_GETTIME 1)
 | 
			
		||||
    else()
 | 
			
		||||
      check_library_exists(rt clock_gettime "" FOUND_CLOCK_GETTIME_LIBRT)
 | 
			
		||||
      if(FOUND_CLOCK_GETTIME_LIBRT)
 | 
			
		||||
        set(HAVE_CLOCK_GETTIME 1)
 | 
			
		||||
        list(APPEND SDL_EXTRA_LIBS rt)
 | 
			
		||||
      endif()
 | 
			
		||||
    endif()
 | 
			
		||||
  endif()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user