diff --git a/.github/workflows/build_native_libraries.yaml b/.github/workflows/build_native_libraries.yaml index 1f779f5..83812df 100644 --- a/.github/workflows/build_native_libraries.yaml +++ b/.github/workflows/build_native_libraries.yaml @@ -159,7 +159,11 @@ jobs: uses: actions/checkout@v2 with: submodules: recursive - + + - name: Modify rlottie CMakeLists.txt + run: sed -i '/add_subdirectory(example)/d' dependency/rlottie/CMakeLists.txt + + - name: Install Emscripten and Build run: | git clone https://github.com/emscripten-core/emsdk.git @@ -168,7 +172,7 @@ jobs: ./emsdk activate latest source ./emsdk_env.sh cd ../projects/CMake - emcmake cmake -S . -B ./buildWebGL + emcmake cmake -S . -B ./buildWebGL -DRLOTTIE_WEB_ASSEMBLY=1 emmake cmake --build ./buildWebGL --config Release tree ../../out diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt index 884aaa2..b22c7bf 100644 --- a/projects/CMake/CMakeLists.txt +++ b/projects/CMake/CMakeLists.txt @@ -32,7 +32,7 @@ set (RLOTTIE_PLUGIN_LIBRARY_SOURCES message("CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") -if (RLOTTIE_IOS) +if (RLOTTIE_IOS OR RLOTTIE_WEB_ASSEMBLY) add_library (LottiePlugin STATIC ${RLOTTIE_PLUGIN_LIBRARY_SOURCES}) else() add_library (LottiePlugin SHARED ${RLOTTIE_PLUGIN_LIBRARY_SOURCES})