From 08f42ae643b74dbbae81bba6bf75831a5e860763 Mon Sep 17 00:00:00 2001 From: Louis Gombert Date: Thu, 8 Aug 2024 11:09:37 +0000 Subject: [PATCH] Fix emscripten search paths --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0494c6a94..92815876d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,15 @@ PROJECT(SalomeSMESH C CXX) # upper case STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) +if (DEFINED EMSCRIPTEN) + list(APPEND CMAKE_FIND_ROOT_PATH "/") + message("Using Emscripten") + add_compile_options("--use-port=boost_headers" "-pthread") + add_link_options("-pthread") +else() + message("Not using Emscripten") +endif() + # Common CMake macros # =================== SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")