A C++ DAL / ORM code generation framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.7 KiB

  1. # We define:
  2. # - SQLITE3_INCLUDE_DIR - Where to find Sqlite 3 header files (directory)
  3. # - SQLITE3_LIBRARIES - Sqlite 3 libraries
  4. # - SQLITE3_LIBRARY_RELEASE - Where the release library is
  5. # - SQLITE3_LIBRARY_DEBUG - Where the debug library is
  6. # - SQLITE3_FOUND - Set to TRUE if we found everything
  7. # (library, includes and executable)
  8. # Taking into account:
  9. # - SQLITE3_PREFIX
  10. # Copyright (c) 2010 Pau Garcia i Quiles, <pgquiles@elpauer.org>
  11. #
  12. # Redistribution and use is allowed according to the terms of the BSD license.
  13. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
  14. #
  15. # Generated by CModuler, a CMake Module Generator - http://gitorious.org/cmoduler
  16. IF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG )
  17. SET(SQLITE3_FIND_QUIETLY TRUE)
  18. ENDIF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG )
  19. FIND_PATH(SQLITE3_INCLUDE_DIR
  20. sqlite3.h
  21. PATHS
  22. ${SQLITE3_PREFIX}/include
  23. /usr/include
  24. /usr/local/include
  25. )
  26. FIND_LIBRARY(SQLITE3_LIBRARY_RELEASE
  27. NAMES
  28. sqlite3
  29. PATHS
  30. /usr/lib/i386-linux-gnu/
  31. ${SQLITE3_PREFIX}/lib
  32. )
  33. FIND_LIBRARY(SQLITE3_LIBRARY_DEBUG
  34. NAMES
  35. sqlite3
  36. HINTS
  37. ${SQLITE3_PREFIX}/lib/debug/usr/lib
  38. )
  39. IF( SQLITE3_LIBRARY_RELEASE OR SQLITE3_LIBRARY_DEBUG AND SQLITE3_INCLUDE_DIR )
  40. SET( SQLITE3_FOUND TRUE )
  41. ENDIF( SQLITE3_LIBRARY_RELEASE OR SQLITE3_LIBRARY_DEBUG AND SQLITE3_INCLUDE_DIR )
  42. IF( SQLITE3_LIBRARY_DEBUG AND SQLITE3_LIBRARY_RELEASE )
  43. # if the generator supports configuration types then set
  44. # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
  45. IF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
  46. SET( SQLITE3_LIBRARIES optimized ${SQLITE3_LIBRARY_RELEASE} debug ${SQLITE3_LIBRARY_DEBUG} )
  47. ELSE( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
  48. # if there are no configuration types and CMAKE_BUILD_TYPE has no value
  49. # then just use the release libraries
  50. SET( SQLITE3_LIBRARIES ${SQLITE3_LIBRARY_RELEASE} )
  51. ENDIF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
  52. ELSEIF( SQLITE3_LIBRARY_RELEASE )
  53. SET( SQLITE3_LIBRARIES ${SQLITE3_LIBRARY_RELEASE} )
  54. ELSE( SQLITE3_LIBRARY_DEBUG AND SQLITE3_LIBRARY_RELEASE )
  55. SET( SQLITE3_LIBRARIES ${SQLITE3_LIBRARY_DEBUG} )
  56. ENDIF( SQLITE3_LIBRARY_DEBUG AND SQLITE3_LIBRARY_RELEASE )
  57. IF( SQLITE3_FOUND )
  58. IF( NOT SQLITE3_FIND_QUIETLY )
  59. MESSAGE( STATUS "Found Sqlite3 header file in ${SQLITE3_INCLUDE_DIR}")
  60. MESSAGE( STATUS "Found Sqlite3 libraries: ${SQLITE3_LIBRARIES}")
  61. ENDIF( NOT SQLITE3_FIND_QUIETLY )
  62. ELSE(SQLITE3_FOUND)
  63. IF( SQLITE3_FIND_REQUIRED)
  64. MESSAGE( FATAL_ERROR "Could not find Sqlite3" )
  65. ELSE( SQLITE3_FIND_REQUIRED)
  66. MESSAGE( STATUS "Optional package Sqlite3 was not found" )
  67. ENDIF( SQLITE3_FIND_REQUIRED)
  68. ENDIF(SQLITE3_FOUND)