Skip to content

Commit

Permalink
Update 'glm' to v0.9.9.5 (#49)
Browse files Browse the repository at this point in the history
* update glm
* removes old default for android
* fixes 'unused' warnings in example
  • Loading branch information
tnixeu authored and bkotzz committed Oct 28, 2019
1 parent 828a558 commit 8fd279a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
7 changes: 1 addition & 6 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,7 @@ hunter_default_version(glbinding VERSION 3.0.2-p0)
hunter_default_version(glew VERSION 2.0.0-p1)
hunter_default_version(glfw VERSION 3.3.0-f9923e9-p0)
hunter_default_version(glib VERSION 2.54.0)
if(ANDROID)
#compile error in the latest glm on Android
hunter_default_version(glm VERSION 0.9.9.0)
else()
hunter_default_version(glm VERSION 0.9.9.2)
endif()
hunter_default_version(glm VERSION 0.9.9.5)
hunter_default_version(globjects VERSION 1.1.0-p0)
hunter_default_version(glog VERSION 0.4.0)
hunter_default_version(glproto VERSION 1.4.17)
Expand Down
19 changes: 18 additions & 1 deletion cmake/projects/glm/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,28 @@ hunter_add_version(
SHA1
e25b219ead246b255b369e35c37c2e31430021f2
)

hunter_add_version(
PACKAGE_NAME
glm
VERSION
"0.9.9.5"
URL
"https://github.com/g-truc/glm/releases/download/0.9.9.5/glm-0.9.9.5.7z"
SHA1
86ac27949abbd6654a74c3530ec4fe900768fb84
)

include(GNUInstallDirs)

# glm use custom bundled GNUInstallDirs module so we have to
# set correct value explicitly
hunter_cmake_args(glm CMAKE_ARGS CMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR})
hunter_cmake_args(
glm
CMAKE_ARGS
CMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
GLM_TEST_ENABLE=OFF
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(glm)
Expand Down
12 changes: 7 additions & 5 deletions examples/glm/core_func_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ namespace floor_
{
float A(1.1f);
float B = glm::floor(A);
Error += glm::epsilonEqual(B, 1.f, 0.0001f) ? 0 : 1;
}

{
double A(1.1f);
double A = 1.1;
double B = glm::floor(A);
Error += glm::epsilonEqual(B, 1.0, 0.0001) ? 0 : 1;
}

{
Expand Down Expand Up @@ -315,8 +317,8 @@ namespace min_
int test()
{
int Error = 0;

glm::vec1 A0 = glm::min(glm::vec1(1), glm::vec1(1));
// is not used
// glm::vec1 A0 = glm::min(glm::vec1(1), glm::vec1(1));

glm::vec2 B0 = glm::min(glm::vec2(1), glm::vec2(1));
glm::vec2 B1 = glm::min(glm::vec2(1), 1.0f);
Expand All @@ -342,8 +344,8 @@ namespace max_
int test()
{
int Error = 0;

glm::vec1 A0 = glm::max(glm::vec1(1), glm::vec1(1));
// is not used
// glm::vec1 A0 = glm::max(glm::vec1(1), glm::vec1(1));

glm::vec2 B0 = glm::max(glm::vec2(1), glm::vec2(1));
glm::vec2 B1 = glm::max(glm::vec2(1), 1.0f);
Expand Down

0 comments on commit 8fd279a

Please sign in to comment.