CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Definitions for all external bundled libraries
  2. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
  3. include(DownloadExternals)
  4. # Catch
  5. add_library(catch-single-include INTERFACE)
  6. target_include_directories(catch-single-include INTERFACE catch/single_include)
  7. # Dynarmic
  8. if (ARCHITECTURE_x86_64)
  9. add_library(xbyak INTERFACE)
  10. set(DYNARMIC_TESTS OFF)
  11. set(DYNARMIC_NO_BUNDLED_FMT ON)
  12. add_subdirectory(dynarmic)
  13. endif()
  14. # libfmt
  15. add_subdirectory(fmt)
  16. add_library(fmt::fmt ALIAS fmt)
  17. # getopt
  18. if (MSVC)
  19. add_subdirectory(getopt)
  20. endif()
  21. # Glad
  22. add_subdirectory(glad)
  23. # inih
  24. add_subdirectory(inih)
  25. # lz4
  26. set(LZ4_BUNDLED_MODE ON)
  27. add_subdirectory(lz4/contrib/cmake_unofficial EXCLUDE_FROM_ALL)
  28. target_include_directories(lz4_static INTERFACE ./lz4/lib)
  29. # mbedtls
  30. add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
  31. target_include_directories(mbedtls PUBLIC ./mbedtls/include)
  32. # MicroProfile
  33. add_library(microprofile INTERFACE)
  34. target_include_directories(microprofile INTERFACE ./microprofile)
  35. # Unicorn
  36. add_library(unicorn-headers INTERFACE)
  37. target_include_directories(unicorn-headers INTERFACE ./unicorn/include)
  38. # Xbyak
  39. if (ARCHITECTURE_x86_64)
  40. # Defined before "dynarmic" above
  41. # add_library(xbyak INTERFACE)
  42. target_include_directories(xbyak INTERFACE ./xbyak/xbyak)
  43. target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
  44. endif()
  45. # Opus
  46. add_subdirectory(opus)
  47. target_include_directories(opus INTERFACE ./opus/include)
  48. # Cubeb
  49. if(ENABLE_CUBEB)
  50. set(BUILD_TESTS OFF CACHE BOOL "")
  51. add_subdirectory(cubeb EXCLUDE_FROM_ALL)
  52. endif()