glmfind.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- CMakeLists.txt 2021-12-22 23:01:57.000000000 +0000
  2. +++ CMakeLists.txt.new 2021-12-27 17:32:52.708000000 +0000
  3. @@ -175,33 +175,7 @@
  4. include_directories(SYSTEM ${Boost_INCLUDE_DIR})
  5. link_directories(${Boost_LIBRARY_DIRS})
  6. -find_package(glm QUIET)
  7. -if(glm_FOUND)
  8. - if(TARGET glm::glm)
  9. - message(STATUS "Found glm")
  10. - else()
  11. - # fallback for old glm version in EmuELEC and Nix
  12. - get_target_property(GLM_INCLUDE_DIR glm INTERFACE_INCLUDE_DIRECTORIES)
  13. - message(STATUS "Found glm: ${GLM_INCLUDE_DIR}")
  14. - add_library(glm::glm INTERFACE IMPORTED)
  15. - set_target_properties(glm::glm PROPERTIES
  16. - INTERFACE_INCLUDE_DIRECTORIES ${GLM_INCLUDE_DIR})
  17. - endif()
  18. -else()
  19. - # fallback for old glm version in UBPorts
  20. - find_path(GLM_INCLUDE_DIR
  21. - NAMES glm/glm.hpp
  22. - PATHS ${GLM_ROOT_DIR}/include)
  23. - if(NOT GLM_INCLUDE_DIR)
  24. - message(FATAL_ERROR "glm library missing")
  25. - endif()
  26. -
  27. - message(STATUS "Found glm: ${GLM_INCLUDE_DIR}")
  28. - add_library(glm::glm INTERFACE IMPORTED)
  29. - set_target_properties(glm::glm PROPERTIES
  30. - INTERFACE_INCLUDE_DIRECTORIES ${GLM_INCLUDE_DIR})
  31. -endif()
  32. -
  33. +find_package(GLM)
  34. find_package(PNG REQUIRED)
  35. if(WIN32)
  36. @@ -918,7 +892,7 @@
  37. add_library(supertux2_c OBJECT ${SUPERTUX_SOURCES_C})
  38. add_library(supertux2_lib STATIC ${CMAKE_BINARY_DIR}/version.h ${SUPERTUX_SOURCES_CXX} ${SUPERTUX_RESOURCES} $<TARGET_OBJECTS:supertux2_c>)
  39. -target_link_libraries(supertux2_lib PUBLIC glm::glm)
  40. +target_link_libraries(supertux2_lib ${GLM_LIBRARIES})
  41. target_compile_definitions(supertux2_lib PUBLIC -DGLM_ENABLE_EXPERIMENTAL)
  42. if(WIN32)