From b9937904e9a9c5b616c92106e06a8f6791f63353 Mon Sep 17 00:00:00 2001 From: Alexandre Bique Date: Fri, 22 Nov 2024 17:52:24 +0100 Subject: [PATCH] More work --- CMakePresets.json | 5 +---- cmake/toolchains/wasm-clang-linux.cmake | 3 +++ plugins/CMakeLists.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 98d5d83..20f768c 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -50,11 +50,8 @@ { "name": "vcpkg", "hidden": true, + "toolchainFile": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": { - "type": "FILEPATH", - "value": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake" - }, "CLAP_PLUGINS_EMBED_QML": { "type": "BOOL", "value": true diff --git a/cmake/toolchains/wasm-clang-linux.cmake b/cmake/toolchains/wasm-clang-linux.cmake index a5d0223..2bb4311 100644 --- a/cmake/toolchains/wasm-clang-linux.cmake +++ b/cmake/toolchains/wasm-clang-linux.cmake @@ -1,6 +1,9 @@ set(CMAKE_SYSTEM_NAME WASI) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR wasm32) +set(CMAKE_CROSSCOMPILING TRUE) + +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) set(triple "wasm32-unknown-wasi") diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index daa0bbf..22ca2b7 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -106,8 +106,8 @@ target_link_libraries(clap-plugins-core PUBLIC clap-helpers) set(clap_plugins_src clap-entry.cc) -if (CMAKE_SYSTEM_PROCESSOR MATCHES wasm) - add_executable(clap-plugins MODULE ${clap_plugins_src}) +if (true OR CMAKE_SYSTEM_PROCESSOR MATCHES wasm) + add_executable(clap-plugins ${clap_plugins_src}) else() add_library(clap-plugins MODULE ${clap_plugins_src}) endif()