Cmake: Right way to search for include files
This commit is contained in:
parent
8d15cacf92
commit
ceff1622c1
@ -1,5 +1,6 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
include (CheckFunctionExists)
|
include (CheckFunctionExists)
|
||||||
|
include (CheckIncludeFile)
|
||||||
include (CheckCXXSourceCompiles)
|
include (CheckCXXSourceCompiles)
|
||||||
include (CPack)
|
include (CPack)
|
||||||
|
|
||||||
@ -49,10 +50,10 @@ if(JPEG_FACTORY)
|
|||||||
include_directories(${JPEG_INCLUDE_DIR})
|
include_directories(${JPEG_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_path (HAVE_SYS_TIME_H sys/time.h )
|
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||||
find_path (HAVE_SYS_TIMEB_H sys/timeb.h )
|
check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
|
||||||
find_path (HAVE_UNISTD_H unistd.h )
|
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||||
find_path (HAVE_WINDOWS_H windows.h)
|
check_include_file(windows.h HAVE_WINDOWS_H)
|
||||||
|
|
||||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||||
check_function_exists(ftime HAVE_FTIME)
|
check_function_exists(ftime HAVE_FTIME)
|
||||||
|
Loading…
Reference in New Issue
Block a user