* Manually including libraries into the project while a perfectly acceptable solution leads to slow updates and large maintainance costs. To address this shortcoming we are introducing a package manager namely vcpkg into the codebase to handle the download and build of most external dependencies. Conan was also considered but vcpkg was chosen due to the centralized nature of the project. To achieve the integration the CMake configuration has been altered but not by much: 1. Packages handled by vcpkg have been moved from externals/CMakeLists.txt to the root one to make them available to all subdirectories. 2. In addition now find_package is used in accordance to the vcpkg recommendations. 3. All libraries built by vcpkg have been updated to their latest available version, except for Qt because our codebase isn't compatible with Qt 6.0 yet. Currently there are build issues caused by the fmtlib upgrade. Another question is how to handle large libraries like Qt, Boost and SDL2 which will be addressed in a later commit.
57 lines
1.3 KiB
CMake
Vendored
57 lines
1.3 KiB
CMake
Vendored
# Definitions for all external bundled libraries
|
|
|
|
# Suppress warnings from external libraries
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
|
add_compile_options(/W0)
|
|
endif()
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
|
include(DownloadExternals)
|
|
include(ExternalProject)
|
|
|
|
# Dynarmic
|
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64)
|
|
set(DYNARMIC_TESTS OFF)
|
|
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
|
set(DYNARMIC_FRONTENDS "A32")
|
|
add_subdirectory(dynarmic)
|
|
endif()
|
|
|
|
# getopt
|
|
if (MSVC)
|
|
add_subdirectory(getopt)
|
|
endif()
|
|
|
|
# inih
|
|
add_subdirectory(inih)
|
|
|
|
# MicroProfile
|
|
add_library(microprofile INTERFACE)
|
|
target_include_directories(microprofile INTERFACE ./microprofile)
|
|
|
|
# Nihstro
|
|
add_library(nihstro-headers INTERFACE)
|
|
target_include_directories(nihstro-headers INTERFACE ./nihstro/include)
|
|
|
|
# Open Source Archives
|
|
add_subdirectory(open_source_archives)
|
|
|
|
# SoundTouch
|
|
add_subdirectory(soundtouch)
|
|
# The SoundTouch target doesn't export the necessary include paths as properties by default
|
|
target_include_directories(SoundTouch INTERFACE ./soundtouch/include)
|
|
|
|
# Teakra
|
|
add_subdirectory(teakra EXCLUDE_FROM_ALL)
|
|
|
|
# Cubeb
|
|
if (ENABLE_CUBEB)
|
|
set(BUILD_TESTS OFF CACHE BOOL "")
|
|
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
|
|
endif()
|
|
|
|
if (ENABLE_WEB_SERVICE AND ANDROID)
|
|
add_subdirectory(android-ifaddrs)
|
|
endif()
|
|
|