From efba6bf3c4fa79d3ba52229911aed6a73e84e5c2 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 16 Jun 2021 16:55:08 +0200 Subject: [PATCH] Trying to fix windows compilation --- .../{build_windows.yml => build.yml} | 4 ++-- .github/workflows/build_linux.yml | 21 ------------------- CMakeLists.txt | 6 +++--- lib/LuaGate/CMakeLists.txt | 4 ++++ 4 files changed, 9 insertions(+), 26 deletions(-) rename .github/workflows/{build_windows.yml => build.yml} (96%) delete mode 100644 .github/workflows/build_linux.yml diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build.yml similarity index 96% rename from .github/workflows/build_windows.yml rename to .github/workflows/build.yml index 192c4d0b..1514d6b7 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ jobs: strategy: matrix: include: - # - os: ubuntu-latest - # name: Linux + - os: ubuntu-latest + name: Linux # - os: macOS-latest # name: MacOS - os: windows-latest diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml deleted file mode 100644 index 9f352ac4..00000000 --- a/.github/workflows/build_linux.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Linux Build (Epitech Container) -on: [push, pull_request] - -jobs: - testbox: - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - runs-on: ubuntu-latest - container: - image: epitechcontent/epitest-docker:latest - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Build - run: | - mkdir build && cd build - cmake .. - cmake --build . - - name: CheckBinaryName - shell: bash - run: test -f build/bomberman \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 72fa0713..62a1882b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,10 +13,10 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/lib/Ray) add_subdirectory(${PROJECT_SOURCE_DIR}/lib/LuaGate) if (EMSCRIPTEN) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_DISABLE_EXCEPTION_CATCHING --shell-file ../sources/wasm/frontend.html --preload-file ../assets") - set(CMAKE_EXECUTABLE_SUFFIX ".html") + set(CMAKE_EXECUTABLE_SUFFIX ".html") endif() set(SOURCES diff --git a/lib/LuaGate/CMakeLists.txt b/lib/LuaGate/CMakeLists.txt index 9e53daeb..635d88bd 100644 --- a/lib/LuaGate/CMakeLists.txt +++ b/lib/LuaGate/CMakeLists.txt @@ -18,6 +18,10 @@ set(SRC ) include(FindLua) +if (NOT LUA_FOUND AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/include/lua.hpp) + set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/) + set(LUA_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}) +endif() add_library(LuaGate STATIC ${SRC} ${HEADERS}) target_include_directories(LuaGate PUBLIC ${LUA_INCLUDE_DIR})