From cb8413499b823c0f858dad92ca94474ecf1caa18 Mon Sep 17 00:00:00 2001 From: David Allemang Date: Sun, 5 Feb 2023 11:21:18 -0500 Subject: [PATCH] COMP: Windows Support --- tc/include/tc/core.hpp | 2 +- vendor/embed.cmake | 2 +- vis/src/main.cpp | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tc/include/tc/core.hpp b/tc/include/tc/core.hpp index c321c3c..7c3f42a 100644 --- a/tc/include/tc/core.hpp +++ b/tc/include/tc/core.hpp @@ -8,7 +8,7 @@ #include namespace tc { - using Mult = u_int16_t; + using Mult = std::uint16_t; constexpr Mult FREE = 0; /** diff --git a/vendor/embed.cmake b/vendor/embed.cmake index d55fd4d..06f71de 100644 --- a/vendor/embed.cmake +++ b/vendor/embed.cmake @@ -52,7 +52,7 @@ function(_embed_file OUTPUT_OBJECT FILE) COMMENT "Embedding ${FILE} in ${OBJECT}" OUTPUT "${FILE}.o" DEPENDS "${FILE}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMAND ${EMBED_LD} -r -o "${OBJECT}" -z noexecstack --format=binary "${FILE}" + COMMAND ${EMBED_LD} -r -o "${OBJECT}" --format=binary "${FILE}" COMMAND ${EMBED_OBJCOPY} --rename-section .data=.rodata,alloc,load,readonly,data,contents "${OBJECT}" VERBATIM ) diff --git a/vis/src/main.cpp b/vis/src/main.cpp index 9b40f5c..00bb621 100644 --- a/vis/src/main.cpp +++ b/vis/src/main.cpp @@ -22,6 +22,10 @@ __attribute__((unused)) __declspec(dllexport) int NvOptimusEnablement = 0x000000 } #endif +#ifndef M_PI_2f32 +#define M_PI_2f32 3.14159265358979323846f +#endif + struct Matrices { Eigen::Matrix4f proj; Eigen::Matrix4f view;