PageRenderTime 57ms CodeModel.GetById 23ms RepoModel.GetById 2ms app.codeStats 0ms

/CMakeModules/FindQCA2.cmake

http://github.com/tomahawk-player/tomahawk
CMake | 50 lines | 23 code | 12 blank | 15 comment | 3 complexity | ddebb397c918a65bb6bf3582f4a2b95c MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, GPL-3.0, GPL-2.0
  1. # - Try to find QCA2 (Qt Cryptography Architecture 2)
  2. # Once done this will define
  3. #
  4. # QCA2_FOUND - system has QCA2
  5. # QCA2_INCLUDE_DIR - the QCA2 include directory
  6. # QCA2_LIBRARIES - the libraries needed to use QCA2
  7. # QCA2_DEFINITIONS - Compiler switches required for using QCA2
  8. #
  9. # use pkg-config to get the directories and then use these values
  10. # in the FIND_PATH() and FIND_LIBRARY() calls
  11. # Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net>
  12. #
  13. # Redistribution and use is allowed according to the terms of the BSD license.
  14. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
  15. include(FindLibraryWithDebug)
  16. if (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
  17. # in cache already
  18. set(QCA2_FOUND TRUE)
  19. else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
  20. if (NOT WIN32)
  21. find_package(PkgConfig)
  22. pkg_check_modules(PC_QCA2 qca2)
  23. set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER})
  24. endif (NOT WIN32)
  25. find_library_with_debug(QCA2_LIBRARIES
  26. WIN32_DEBUG_POSTFIX d
  27. NAMES qca
  28. HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS}
  29. )
  30. find_path(QCA2_INCLUDE_DIR qca.h
  31. HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS}
  32. PATH_SUFFIXES QtCrypto
  33. PATHS /usr/local/lib/qca.framework/Headers/
  34. )
  35. include(FindPackageHandleStandardArgs)
  36. find_package_handle_standard_args(QCA2 DEFAULT_MSG QCA2_LIBRARIES QCA2_INCLUDE_DIR)
  37. mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES)
  38. endif (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)