On Win32, things are failing to build with messages like:
RenderableEntityItem.cpp(674,51): error C2065: 'M_PI': undeclared identifier
This is because as per Microsoft documentation, _USE_MATH_DEFINES is needed to
obtain constants like M_PI:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-160
It seems this worked previously due to some quirk of CMake, but stopped working
after some reordering. This change makes this definition explicit where it is needed.
When Qt5 5.2.1 is compiled from source, configured with
-developer-build, and used without being installed;
then compiling interface results in the following compile error:
libraries/shared/src/RegisteredMetaTypes.h:17:34: fatal error: QtScript/QScriptEngine: No such file or directory
This commit fixes this by explicitely adding the include
directory for QtScript/QScriptEngine to libraries/shared/CMakeLists.txt
Likewise we get the compile error:
In file included from /opt/highfidelity/hifi/hifi/animation-server/../libraries/voxels/src/VoxelEditPacketSender.h:18:0,
from /opt/highfidelity/hifi/hifi/animation-server/src/AnimationServer.cpp:26:
/opt/highfidelity/hifi/hifi/animation-server/../libraries/voxels/src/VoxelDetail.h:15:34:
fatal error: QtScript/QScriptEngine: No such file or directory
which is fixed by added the include directory for QtScript/QScriptEngine
to animation-server/CMakeLists.txt
Finally, compile errors like
In file included from /opt/highfidelity/hifi/hifi/libraries/audio/src/AudioInjectorOptions.h:20:0,
from /opt/highfidelity/hifi/hifi/libraries/audio/src/AudioInjector.h:21,
from /opt/highfidelity/hifi/hifi/libraries/audio/src/AudioInjector.cpp:22:
/opt/highfidelity/hifi/hifi/assignment-client/../libraries/shared/src/RegisteredMetaTypes.h:17:34: fatal error: QtScript/QScriptEngine: No such file or directory
that requires to do the same in libraries/audio/CMakeLists.txt