mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 22:54:07 +02:00
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.
15 lines
567 B
CMake
15 lines
567 B
CMake
set(TARGET_NAME entities)
|
|
setup_hifi_library(Network Script)
|
|
target_include_directories(${TARGET_NAME} PRIVATE "${OPENSSL_INCLUDE_DIR}")
|
|
include_hifi_library_headers(hfm)
|
|
include_hifi_library_headers(model-serializers)
|
|
include_hifi_library_headers(gpu)
|
|
include_hifi_library_headers(image)
|
|
include_hifi_library_headers(ktx)
|
|
include_hifi_library_headers(material-networking)
|
|
include_hifi_library_headers(procedural)
|
|
link_hifi_libraries(shared shaders networking octree avatars graphics model-networking)
|
|
|
|
if (WIN32)
|
|
add_compile_definitions(_USE_MATH_DEFINES)
|
|
endif()
|