Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 29 additions & 35 deletions buildscripts/cmake/PrepareDepsSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ function(_pds_tarball name label url sha256)
_bd_fetch("${_archive}" "${sha256}" ${_urls})
endfunction()

# Resolve a dep's version (metadata DEP_VERSION) and include its spec. Sets
# <out_spec> to the spec path, "" if there is no recipe.
# Read the recipe version and return the spec path, or "" if no recipe exists.
function(_pds_spec name out_spec out_version)
include("${EXTDEPS_DIR}/${name}/${name}.cmake")
set(_version "${DEP_VERSION}")
set(_spec "${EXTDEPS_DIR}/${name}/${_version}/recipe/spec.cmake")
if (NOT EXISTS "${_spec}")
set(_spec "${EXTDEPS_DIR}/recipes/${name}/spec.cmake")
set(_version "")
if (EXISTS "${_spec}")
include("${_spec}")
set(_version "${DEP_VERSION}")
else()
set(_spec "")
endif()
set(${out_spec} "${_spec}" PARENT_SCOPE)
Expand All @@ -76,10 +77,10 @@ endfunction()
function(require_dep name)
if ("${ARGV1}" STREQUAL "SYSTEM")
message(STATUS "[prepare] skip ${name} (system)")
elseif ("${ARGV1}" STREQUAL "REBUILD" OR "${ARGV1}" STREQUAL "")
elseif ("${ARGV1}" STREQUAL "REBUILD" OR "${ARGV1}" STREQUAL "STATIC" OR "${ARGV1}" STREQUAL "")
_pds_single("${name}")
else()
message(FATAL_ERROR "[prepare] ${name}: require_dep accepts only REBUILD or SYSTEM (got '${ARGV1}')")
message(FATAL_ERROR "[prepare] ${name}: require_dep accepts only REBUILD, STATIC, or SYSTEM (got '${ARGV1}')")
endif()
endfunction()

Expand All @@ -101,11 +102,7 @@ function(_pds_sources name)
file(MAKE_DIRECTORY "${_download_dir}")
find_program(GIT NAMES git)
foreach(_source ${DEP_SOURCES})
string(REPLACE "|" ";" _source_fields "${_source}")
list(GET _source_fields 0 _source_sub)
list(GET _source_fields 1 _source_kind)
list(GET _source_fields 2 _source_location)
list(GET _source_fields 3 _source_pin)
_bd_parse_source("${_source}" _source_sub _source_kind _source_location _source_pin)
if (_source_kind STREQUAL "tarball")
if (_source_sub STREQUAL name)
set(label "${name}-${version}")
Expand Down Expand Up @@ -146,26 +143,23 @@ function(require_source_dep name)
_pds_sources("${name}")
endfunction()

# Run the manifest once per OS_IS_WIN (asio) to gather all dependencies
# TODO: consider running on all combinations (os, arch ,etc) if needed
macro(_pds_manifest win)
set(OS_IS_LIN FALSE)
set(OS_IS_FBSD FALSE)
set(OS_IS_MAC FALSE)
set(OS_IS_WIN ${win})
set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID "x86_64")
set(MUSE_MODULE_VST ON)
set(MUSE_MODULE_DRAW ON)
set(MUSE_MODULE_AUDIO ON)
set(MUSE_MODULE_AUDIO_EXPORT ON)
set(MUSE_MODULE_DOCKWINDOW ON)
set(MUSE_MODULE_DOCKWINDOW_KDDOCKWIDGETS_V2 ON)
set(MUSE_MODULE_DIAGNOSTICS_CRASHPAD_CLIENT ON)
set(MUSE_ENABLE_UNIT_TESTS ON)
set(MUE_BUILD_IMPEXP_MNX_MODULE ON)
include("${_self_dir}/DependencyManifest.cmake")
include("${_root}/muse/buildscripts/cmake/ExtDepsManifest.cmake")
endmacro()
_pds_manifest(FALSE)
_pds_manifest(TRUE)
set(OS_IS_WIN TRUE)
set(MUSE_MODULE_VST ON)
set(MUSE_MODULE_DRAW ON)
set(MUSE_MODULE_DRAW_USE_FONTFACE_FT ON)
set(MUSE_MODULE_DRAW_USE_FONTFACE_XT ON)
set(MUSE_MODULE_DRAW_USE_QTTEXTDRAW OFF)
set(MUSE_MODULE_AUDIO ON)
set(MUSE_MODULE_AUDIO_EXPORT ON)
set(MUSE_MODULE_AUDIO_PIPEWIRE ON)
Comment thread
kryksyh marked this conversation as resolved.
Resolved
set(MUSE_MODULE_DOCKWINDOW ON)
set(MUSE_MODULE_DOCKWINDOW_KDDOCKWIDGETS_V2 ON)
set(MUSE_ENABLE_UNIT_TESTS ON)
set(MUE_BUILD_IMPEXP_MNX_MODULE ON)
if (NOT DEFINED MUSE_MODULE_DIAGNOSTICS_CRASHPAD_CLIENT)
set(MUSE_MODULE_DIAGNOSTICS_CRASHPAD_CLIENT OFF)
endif()

include("${_self_dir}/DependencyManifest.cmake")
include("${_root}/muse/buildscripts/cmake/ExtDepsManifest.cmake")
message(STATUS "[prepare] sources ready in ${EXTDEPS_CACHE}/downloads")
Loading