mirror of
https://github.com/walterschell/Lua.git
synced 2024-11-25 14:24:36 +00:00
Merge pull request #6 from walterschell/WIP/fix-emscripten
Fixes emscripten
This commit is contained in:
commit
e01a929b9e
11
.github/workflows/build-emscripten.yml
vendored
11
.github/workflows/build-emscripten.yml
vendored
@ -11,20 +11,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: mymindstorm/setup-emsdk@v7
|
- uses: mymindstorm/setup-emsdk@v7
|
||||||
with:
|
|
||||||
# Make sure to set a version number!
|
|
||||||
version: 1.38.40
|
|
||||||
# This is the name of the cache folder.
|
|
||||||
# The cache folder will be placed in the build directory,
|
|
||||||
# so make sure it doesn't conflict with anything!
|
|
||||||
actions-cache-folder: 'emsdk-cache'
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Create Build Environment
|
- name: Create Build Environment
|
||||||
# Some projects don't allow in-source building, so create a separate build directory
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
# We'll use this as our working directory for all subsequent commands
|
# We'll use this as our working directory for all subsequent commands
|
||||||
run: cmake -E make_directory ${{github.workspace}}/build
|
run: emcmake cmake -E make_directory ${{github.workspace}}/build
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
# Use a bash shell so we can use the same syntax for environment variable
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
@ -40,5 +33,5 @@ jobs:
|
|||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
shell: bash
|
shell: bash
|
||||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
run: emcmake cmake --build . --config $BUILD_TYPE
|
run: cmake --build . --config $BUILD_TYPE
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ target_include_directories(lua_static PUBLIC "include")
|
|||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(LUA_DEFINITIONS)
|
set(LUA_DEFINITIONS)
|
||||||
|
|
||||||
|
if(NOT EMSCRIPTEN)
|
||||||
find_library(LIBM m)
|
find_library(LIBM m)
|
||||||
#TODO: Redo this with find_package
|
#TODO: Redo this with find_package
|
||||||
if(NOT LIBM)
|
if(NOT LIBM)
|
||||||
@ -51,6 +52,8 @@ if(UNIX)
|
|||||||
target_compile_definitions(lua_static PRIVATE "LUA_USE_DLOPEN")
|
target_compile_definitions(lua_static PRIVATE "LUA_USE_DLOPEN")
|
||||||
target_link_libraries(lua_static INTERFACE dl)
|
target_link_libraries(lua_static INTERFACE dl)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(lua_static
|
target_compile_definitions(lua_static
|
||||||
PUBLIC ${LUA_DEFINITIONS}
|
PUBLIC ${LUA_DEFINITIONS}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user