From b3e6c6d3bbb0faf683d9114f53ee142136a495ac Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 15 Jan 2006 13:49:12 +0000 Subject: -small wrapper around cmake's CheckTypeSize to turn it into a "CheckPrototypeExists" Alex svn path=/trunk/KDE/kdesdk/cmake/; revision=498414 --- modules/CheckPrototypeExists.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules/CheckPrototypeExists.cmake (limited to 'modules/CheckPrototypeExists.cmake') diff --git a/modules/CheckPrototypeExists.cmake b/modules/CheckPrototypeExists.cmake new file mode 100644 index 00000000..4797865f --- /dev/null +++ b/modules/CheckPrototypeExists.cmake @@ -0,0 +1,16 @@ +# - Check if the prototype for a function exists. +# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE) +# +# FUNCTION - the name of the function you are looking for +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# + +INCLUDE(CheckTypeSize) + +MACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + SET(CMAKE_EXTRA_INCLUDE_FILES ${_HEADER}) + CHECK_TYPE_SIZE(${_SYMBOL} ${_RESULT}) + SET(CMAKE_EXTRA_INCLUDE_FILES) +ENDMACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + -- cgit v1.2.1