Errors occur when #including "$(OutDir)"\include\fdk-aac\FDK_audio.h
kbarnes3 opened this issue · comments
After building this project, FFmpeg or anything else that attempts to #include FDK_audio.h from the output directory will get an error like this:
Cannot open include file: 'syslib_channelMapDescr.h': No such file or directory (compiling source file ..\libavcodec\libfdk-aacdec.c) libavcodec d:\users\kevin\documents\code\ffmpeg\msvc\include\fdk-aac\fdk_audio.h
Context
This is happening because FDK_audio.h has this line:
#include "syslib_channelMapDescr.h"
This header is not copied to the output directory, so no other projects should be expected to find it.
Expected Behavior
The SMP FFmpeg project should be able to include fdk-aac headers without errors
Actual Behavior
The SMP FFmpeg project can't include fdk-aac
Steps to Reproduce
- Configure FFmpeg with --enable-libfdk-aac
- Build fdk-aac
- Attempt to build ffmpeg
Your Environment
Visual Studio 2017
Windows 10, 1809
Possible Fix
<PostBuildEvent>
<Command>mkdir "$(OutDir)"\include
mkdir "$(OutDir)"\include\fdk-aac
copy ..\libSYS\include\machine_type.h "$(OutDir)"\include\fdk-aac
copy ..\libSYS\include\FDK_audio.h "$(OutDir)"\include\fdk-aac
copy ..\libSYS\include\genericStds.h "$(OutDir)"\include\fdk-aac
copy ..\libSYS\include\syslib_channelMapDescr.h "$(OutDir)"\include\fdk-aac
copy ..\libAACenc\include\aacenc_lib.h "$(OutDir)"\include\fdk-aac
copy ..\libAACdec\include\aacdecoder_lib.h "$(OutDir)"\include\fdk-aac
mkdir $(OutDir)\licenses
copy ..\NOTICE $(OutDir)\licenses\fdk-aac.txt</Command>
</PostBuildEvent>