1 # Try to find Wcecompat functionality
2 # Once done this will define
4 # WCECOMPAT_FOUND - system has Wcecompat
5 # WCECOMPAT_INCLUDE_DIR - Wcecompat include directory
6 # WCECOMPAT_LIBRARIES - Libraries needed to use Wcecompat
8 # Copyright (c) 2010, Andreas Holzammer, <andy@kdab.com>
10 # Redistribution and use is allowed according to the terms of the BSD license.
12 if(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND)
13 set(Wcecompat_FIND_QUIETLY TRUE)
14 endif(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND)
16 find_path(WCECOMPAT_INCLUDE_DIR errno.h PATH_SUFFIXES wcecompat)
18 set(WCECOMPAT_LIB_FOUND FALSE)
20 if(WCECOMPAT_INCLUDE_DIR)
21 find_library(WCECOMPAT_LIBRARIES NAMES wcecompat wcecompatex )
22 if(WCECOMPAT_LIBRARIES)
23 set(WCECOMPAT_LIB_FOUND TRUE)
24 endif(WCECOMPAT_LIBRARIES)
25 endif(WCECOMPAT_INCLUDE_DIR)
27 # I have no idea what this is about, but it seems to be used quite often, so I add this here
28 set(WCECOMPAT_CONST const)
30 include(FindPackageHandleStandardArgs)
31 find_package_handle_standard_args(Wcecompat DEFAULT_MSG WCECOMPAT_LIBRARIES WCECOMPAT_LIB_FOUND)
33 mark_as_advanced(WCECOMPAT_INCLUDE_DIR WCECOMPAT_LIBRARIES WCECOMPAT_CONST WCECOMPAT_LIB_FOUND)