Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move GLM_ENABLE_EXPERIMENTAL into compile flags #1813

Merged
merged 1 commit into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -912,14 +912,18 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})

add_library(supertux2_c OBJECT ${SUPERTUX_SOURCES_C})
add_library(supertux2_lib STATIC ${CMAKE_BINARY_DIR}/version.h ${SUPERTUX_SOURCES_CXX} ${SUPERTUX_RESOURCES} $<TARGET_OBJECTS:supertux2_c>)

target_link_libraries(supertux2_lib PUBLIC glm::glm)
target_compile_definitions(supertux2_lib PUBLIC -DGLM_ENABLE_EXPERIMENTAL)

if(WIN32)
add_executable(supertux2 WIN32 src/main.cpp ${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.rc)
target_link_libraries(supertux2 ${SDL2MAIN_LIBRARIES})
else()
add_executable(supertux2 src/main.cpp)
endif(WIN32)
target_link_libraries(supertux2 supertux2_lib Boost::filesystem Boost::locale)
target_link_libraries(supertux2 glm::glm)

set_target_properties(supertux2_lib PROPERTIES OUTPUT_NAME supertux2_lib)
set_target_properties(supertux2_lib PROPERTIES COMPILE_FLAGS "${SUPERTUX2_EXTRA_WARNING_FLAGS}")
if(EMSCRIPTEN)
Expand Down
4 changes: 0 additions & 4 deletions src/math/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@

#ifndef HEADER_SUPERTUX_MATH_VECTOR_HPP
#define HEADER_SUPERTUX_MATH_VECTOR_HPP
#if defined(__arm__) && !defined(__ANDROID__)
#define GLM_ENABLE_EXPERIMENTAL
#endif

#include <math.h>
#include <iosfwd>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include <glm/gtx/io.hpp>


using Vector = glm::vec2;

namespace math {
Expand Down