diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2013-05-04 21:39:27 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2013-05-04 21:39:27 +0000 |
commit | fec6336699f34758d3e6cb41b2edf902fedb9035 (patch) | |
tree | 8256c1dbf3ca7c9e58a3dbecf07cf826fb2e0ce2 /cmake/modules/FindWcecompat.cmake | |
parent | 7dbffd7e2b0067e834801617c5c486e3177f6709 (diff) | |
download | libical-fec6336699f34758d3e6cb41b2edf902fedb9035.tar.gz |
libical-1.0HEADlibical-1.0master
Diffstat (limited to 'cmake/modules/FindWcecompat.cmake')
-rw-r--r-- | cmake/modules/FindWcecompat.cmake | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cmake/modules/FindWcecompat.cmake b/cmake/modules/FindWcecompat.cmake new file mode 100644 index 0000000..4276975 --- /dev/null +++ b/cmake/modules/FindWcecompat.cmake @@ -0,0 +1,33 @@ +# Try to find Wcecompat functionality +# Once done this will define +# +# WCECOMPAT_FOUND - system has Wcecompat +# WCECOMPAT_INCLUDE_DIR - Wcecompat include directory +# WCECOMPAT_LIBRARIES - Libraries needed to use Wcecompat +# +# Copyright (c) 2010, Andreas Holzammer, <andy@kdab.com> +# +# Redistribution and use is allowed according to the terms of the BSD license. + +if(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND) + set(Wcecompat_FIND_QUIETLY TRUE) +endif(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND) + +find_path(WCECOMPAT_INCLUDE_DIR errno.h PATH_SUFFIXES wcecompat) + +set(WCECOMPAT_LIB_FOUND FALSE) + +if(WCECOMPAT_INCLUDE_DIR) + find_library(WCECOMPAT_LIBRARIES NAMES wcecompat wcecompatex ) + if(WCECOMPAT_LIBRARIES) + set(WCECOMPAT_LIB_FOUND TRUE) + endif(WCECOMPAT_LIBRARIES) +endif(WCECOMPAT_INCLUDE_DIR) + +# I have no idea what this is about, but it seems to be used quite often, so I add this here +set(WCECOMPAT_CONST const) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Wcecompat DEFAULT_MSG WCECOMPAT_LIBRARIES WCECOMPAT_LIB_FOUND) + +mark_as_advanced(WCECOMPAT_INCLUDE_DIR WCECOMPAT_LIBRARIES WCECOMPAT_CONST WCECOMPAT_LIB_FOUND) |