buildsystem/cmake: Add an embryonary CMake support. Files are constrained into the...
[vlc.git] / extras / buildsystem / cmake / include / vlc_check_type.cmake
1 include (CheckTypeSize)
2
3 MACRO(vlc_check_type type header)
4     # Construct the HAVE_ var
5     string(REGEX REPLACE "[ -./:;,?=+\\]" "_" type_escaped ${type})
6     string(TOUPPER ${type_escaped} type_escaped)
7     set(CMAKE_EXTRA_INCLUDE_FILES ${header})
8     check_type_size( ${type} HAVE_${type_escaped} )
9     set(CMAKE_EXTRA_INCLUDE_FILES)
10 ENDMACRO(vlc_check_type)