1
0
Fork 0
flightgear/CMakeModules/FindAAX.cmake

75 lines
1.7 KiB
CMake
Raw Normal View History

# Try to find AAX (AeonWave)
2016-07-06 11:27:28 +00:00
# This module defines
#
# AAX_FOUND - if false, do not try to link to AAX
# AAX_INCLUDE_DIR - where to find the headers
2020-08-24 09:00:05 +00:00
# AAX_LIBRARY - Link these to use AAX
#
# Copyright (C) 2016-2018 by Erik Hofman.
# Copyright (C) 2016-2018 by Adalin B.V.
2016-07-06 11:27:28 +00:00
#
# $AAXDIR is an environment variable that would
# correspond to the ./configure --prefix=$AAXDIR
# used in building AAX.
#
# This file is Public Domain (www.unlicense.org)
# This is free and unencumbered software released into the public domain.
2016-07-06 11:27:28 +00:00
2018-06-05 07:40:29 +00:00
if (AAX_LIBRARY AND AAX_INCLUDE_DIR)
# in cache already
set(AAX_FOUND TRUE)
message(STATUS "Found AeonWave: ${AAX_LIBRARY}")
2018-06-05 07:40:29 +00:00
else()
find_path(AAX_INCLUDE_DIR aax/aax.h
HINTS
$ENV{AAXDIR}
$ENV{ProgramFiles}/aax
$ENV{ProgramFiles}/AeonWave
$ENV{ProgramFiles}/Adalin/AeonWave
${CMAKE_SOURCE_DIR}/aax
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/opt
)
2016-07-06 11:27:28 +00:00
2018-06-05 07:40:29 +00:00
find_library(AAX_LIBRARY
NAMES AAX aax libAAX
HINTS
$ENV{AAXDIR}
$ENV{ProgramFiles}/AAX
$ENV{ProgramFiles}/AeonWave
$ENV{ProgramFiles}/Adalin/AeonWave
${CMAKE_BUILD_DIR}/aax
PATH_SUFFIXES lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE} libs64 libs libs/Win32 libs/Win64 bin
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/opt
)
2016-07-06 11:27:28 +00:00
2018-06-05 07:40:29 +00:00
set(AAX_DEFINITIONS "")
if (AAX_LIBRARY AND AAX_INCLUDE_DIR)
set(AAX_FOUND TRUE)
endif()
if (AAX_FOUND)
2020-08-24 09:00:05 +00:00
if (NOT Udns_FIND_QUIETLY)
message(STATUS "Found AeonWave: ${AAX_LIBRARY}")
endif ()
2018-06-05 07:40:29 +00:00
else ()
2020-08-24 09:00:05 +00:00
if (Udns_FIND_REQUIRED)
message(FATAL_ERROR "Could not find AeonWave")
endif ()
2018-06-05 07:40:29 +00:00
endif ()
2020-08-24 09:00:05 +00:00
mark_as_advanced(AAX_LIBRARY AAX_INCLUDE_DIR)
2018-06-05 07:40:29 +00:00
endif()
2016-07-06 11:27:28 +00:00