CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Definitions for all external bundled libraries
  2. list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules")
  3. list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/externals/find-modules")
  4. include(DownloadExternals)
  5. # Catch
  6. add_library(catch-single-include INTERFACE)
  7. target_include_directories(catch-single-include INTERFACE catch/single_include)
  8. # Dynarmic
  9. if (ARCHITECTURE_x86_64)
  10. set(DYNARMIC_TESTS OFF)
  11. set(DYNARMIC_NO_BUNDLED_FMT ON)
  12. add_subdirectory(dynarmic)
  13. endif()
  14. # getopt
  15. if (MSVC)
  16. add_subdirectory(getopt)
  17. endif()
  18. # Glad
  19. add_subdirectory(glad)
  20. # inih
  21. add_subdirectory(inih)
  22. # mbedtls
  23. add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
  24. target_include_directories(mbedtls PUBLIC ./mbedtls/include)
  25. # MicroProfile
  26. add_library(microprofile INTERFACE)
  27. target_include_directories(microprofile INTERFACE ./microprofile)
  28. # Unicorn
  29. add_library(unicorn-headers INTERFACE)
  30. target_include_directories(unicorn-headers INTERFACE ./unicorn/include)
  31. # SoundTouch
  32. add_subdirectory(soundtouch)
  33. # Cubeb
  34. if(ENABLE_CUBEB)
  35. set(BUILD_TESTS OFF CACHE BOOL "")
  36. add_subdirectory(cubeb EXCLUDE_FROM_ALL)
  37. endif()
  38. # DiscordRPC
  39. if (USE_DISCORD_PRESENCE)
  40. add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
  41. target_include_directories(discord-rpc INTERFACE ./discord-rpc/include)
  42. endif()
  43. # Sirit
  44. if (ENABLE_VULKAN)
  45. add_subdirectory(sirit)
  46. endif()
  47. # libzip
  48. find_package(Libzip 1.5)
  49. if (NOT LIBZIP_FOUND)
  50. message(STATUS "libzip 1.5 or newer not found, falling back to externals")
  51. add_subdirectory(libzip EXCLUDE_FROM_ALL)
  52. endif()
  53. if (ENABLE_WEB_SERVICE)
  54. # lurlparser
  55. add_subdirectory(lurlparser EXCLUDE_FROM_ALL)
  56. # httplib
  57. add_library(httplib INTERFACE)
  58. target_include_directories(httplib INTERFACE ./httplib)
  59. target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT)
  60. target_link_libraries(httplib INTERFACE OpenSSL::SSL OpenSSL::Crypto)
  61. endif()
  62. if (NOT TARGET xbyak)
  63. if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
  64. add_library(xbyak INTERFACE)
  65. target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak)
  66. target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
  67. endif()
  68. endif()