cmakelist.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --- CMakeLists.txt 2022-09-11 07:28:37.000000000 +0530
  2. +++ CMakeListsn.txt 2023-02-05 13:56:32.245000000 +0530
  3. @@ -1,4 +1,3 @@
  4. -
  5. set(LIBNAME uavs3d)
  6. # check cpu
  7. @@ -13,6 +12,8 @@
  8. " Unexpected pointer size ${CMAKE_SIZEOF_VOID_P} for ${CMAKE_SYSTEM_PROCESSOR}\n")
  9. endif()
  10. elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386" OR
  11. + "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i586" OR
  12. + "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" OR
  13. "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86")
  14. set(UAVS3D_TARGET_CPU "x86")
  15. elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64")
  16. @@ -104,7 +105,17 @@
  17. find_package(Threads REQUIRED)
  18. set(prefix "${CMAKE_INSTALL_PREFIX}")
  19. set(includedir "include")
  20. +if(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
  21. +set(libdir "lib")
  22. +elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^arm")
  23. set(libdir "lib")
  24. +elseif(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
  25. +set(libdir "lib64")
  26. +elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64")
  27. +set(libdir "lib64")
  28. +else()
  29. +message(FATAL_ERROR " Compiling for wrong architecture in Slackware GNU/Linux \n")
  30. +endif()
  31. set(pc_file "${CONFIG_DIR}/${LIBNAME}.pc")
  32. set(CMAKE_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${includedir}")