1 #[=======================================================================[.rst:
5 Finds the allegro library.
10 This will define the following variables:
13 True if the system has the allegro library.
14 ``Allegro_INCLUDE_DIRS``
15 Include directories needed to use allegro.
17 Libraries needed to link to allegro.
19 The version of the allegro library which was found.
24 The following cache variables may also be set:
26 ``Allegro_INCLUDE_DIR``
27 The directory containing ``allegro.h``.
29 The path to the allegro library.
31 #]=======================================================================]
33 find_package(PkgConfig QUIET)
34 pkg_check_modules(PC_Allegro QUIET allegro<5)
36 find_path(Allegro_INCLUDE_DIR
38 PATHS ${PC_Allegro_INCLUDE_DIRS}
41 find_library(Allegro_LIBRARY
43 PATHS ${PC_Allegro_LIBRARY_DIRS}
46 set(Allegro_VERSION ${PC_Allegro_VERSION})
48 include(FindPackageHandleStandardArgs)
49 find_package_handle_standard_args(Allegro
50 FOUND_VAR Allegro_FOUND
54 VERSION_VAR Allegro_VERSION
58 set(Allegro_LIBRARIES ${Allegro_LIBRARY})
59 set(Allegro_INCLUDE_DIRS ${Allegro_INCLUDE_DIR})