From e7d26b0f2fe40076aa746439a4d4fdd4a9e9a2f5 Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Tue, 3 Jun 2025 16:56:55 +0200 Subject: [PATCH] fix for wasm --- src/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9be762a..07fe43e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,6 +24,24 @@ target_include_directories(qwt file(GLOB_RECURSE QWT_SOURCES "*.cpp") file(GLOB_RECURSE QWT_HEADERS "*.hpp" "*.h") + +if (EMSCRIPTEN) + set(EXCLUDED_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/qwt_date_scale_draw.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/qwt_date_scale_draw.h" + "${CMAKE_CURRENT_SOURCE_DIR}/qwt_date_scale_engine.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/qwt_date_scale_engine.h" + "${CMAKE_CURRENT_SOURCE_DIR}/qwt_date.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/qwt_date.h" + ) + + # Remove them from the list + foreach(file_to_exclude IN LISTS EXCLUDED_FILES) + list(REMOVE_ITEM QWT_SOURCES "${file_to_exclude}") + list(REMOVE_ITEM QWT_HEADERS "${file_to_exclude}") + endforeach() +endif() + target_sources(qwt PRIVATE ${QWT_SOURCES}