dep-unbundle.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index 0b51071..ecc2c9e 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -240,8 +240,8 @@ message(WARNING "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
  6. message(WARNING "CMAKE_CXX_FLAGS_DEBUG is ${CMAKE_CXX_FLAGS_DEBUG}")
  7. message(WARNING "CMAKE_CXX_FLAGS_RELEASE is ${CMAKE_CXX_FLAGS_RELEASE}")
  8. message(WARNING "==========")
  9. -
  10. -if(NOT TARGET asmjit)
  11. +find_package(asmjit CONFIG REQUIRED)
  12. +if(0)
  13. #Download asmjit from github if ASMJIT_SRC_DIR is not specified.
  14. if(NOT DEFINED ASMJIT_SRC_DIR)
  15. set(ASMJIT_SRC_DIR "${FBGEMM_SOURCE_DIR}/third_party/asmjit"
  16. @@ -269,8 +269,8 @@ if(NOT TARGET asmjit)
  17. target_compile_options_if_supported(asmjit -Wno-unused-but-set-variable)
  18. endif()
  19. endif()
  20. -
  21. -if(NOT TARGET cpuinfo)
  22. +find_package(cpuinfo CONFIG REQUIRED)
  23. +if(0)
  24. #Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified.
  25. if(NOT DEFINED CPUINFO_SOURCE_DIR)
  26. set(CPUINFO_SOURCE_DIR "${FBGEMM_SOURCE_DIR}/third_party/cpuinfo"
  27. @@ -354,12 +354,7 @@ target_include_directories(fbgemm BEFORE
  28. PUBLIC $<BUILD_INTERFACE:${FBGEMM_SOURCE_DIR}>
  29. PUBLIC $<BUILD_INTERFACE:${FBGEMM_SOURCE_DIR}/include>)
  30. -target_link_libraries(fbgemm
  31. - $<BUILD_INTERFACE:asmjit>
  32. - $<BUILD_INTERFACE:cpuinfo>)
  33. -add_dependencies(fbgemm
  34. - asmjit
  35. - cpuinfo)
  36. +target_link_libraries(fbgemm asmjit cpuinfo)
  37. if(OpenMP_FOUND)
  38. target_link_libraries(fbgemm OpenMP::OpenMP_CXX)
  39. @@ -383,12 +378,12 @@ install(
  40. if(MSVC)
  41. if(FBGEMM_LIBRARY_TYPE STREQUAL "shared")
  42. - install(
  43. - FILES $<TARGET_PDB_FILE:fbgemm> $<TARGET_PDB_FILE:asmjit>
  44. - DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL)
  45. + # install(
  46. + # FILES $<TARGET_PDB_FILE:fbgemm> $<TARGET_PDB_FILE:asmjit>
  47. + # DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL)
  48. endif()
  49. install(TARGETS fbgemm DESTINATION ${CMAKE_INSTALL_LIBDIR})
  50. - install(TARGETS asmjit DESTINATION ${CMAKE_INSTALL_LIBDIR})
  51. + # install(TARGETS asmjit DESTINATION ${CMAKE_INSTALL_LIBDIR})
  52. endif()
  53. #Make project importable from the build directory