CMakeLists.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. # Open Source Archives
  36. add_subdirectory(open_source_archives EXCLUDE_FROM_ALL)
  37. # Unicorn
  38. add_library(unicorn-headers INTERFACE)
  39. target_include_directories(unicorn-headers INTERFACE ./unicorn/include)
  40. # SoundTouch
  41. add_subdirectory(soundtouch)
  42. # Xbyak
  43. if (ARCHITECTURE_x86_64)
  44. # Defined before "dynarmic" above
  45. # add_library(xbyak INTERFACE)
  46. target_include_directories(xbyak INTERFACE ./xbyak/xbyak)
  47. target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
  48. endif()
  49. # Opus
  50. add_subdirectory(opus)
  51. target_include_directories(opus INTERFACE ./opus/include)
  52. # Cubeb
  53. if(ENABLE_CUBEB)
  54. set(BUILD_TESTS OFF CACHE BOOL "")
  55. add_subdirectory(cubeb EXCLUDE_FROM_ALL)
  56. endif()
  57. # DiscordRPC
  58. if (USE_DISCORD_PRESENCE)
  59. add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
  60. target_include_directories(discord-rpc INTERFACE ./discord-rpc/include)
  61. endif()
  62. if (ENABLE_WEB_SERVICE)
  63. # LibreSSL
  64. set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "")
  65. add_subdirectory(libressl EXCLUDE_FROM_ALL)
  66. target_include_directories(ssl INTERFACE ./libressl/include)
  67. target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP)
  68. # lurlparser
  69. add_subdirectory(lurlparser EXCLUDE_FROM_ALL)
  70. # httplib
  71. add_library(httplib INTERFACE)
  72. target_include_directories(httplib INTERFACE ./httplib)
  73. # JSON
  74. add_library(json-headers INTERFACE)
  75. target_include_directories(json-headers INTERFACE ./json)
  76. endif()