From 12db15d8a659cfaf987a33a2008da995a7a47c4d Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 16 Jun 2021 17:05:14 +0200 Subject: [PATCH] Second try --- .github/workflows/build.yml | 3 ++- lib/LuaGate/CMakeLists.txt | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1514d6b7..19241197 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Windows Build +name: Build on: [push, pull_request] jobs: @@ -7,6 +7,7 @@ jobs: runs-on: ${{ matrix.os }} if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: + fail-fast: false matrix: include: - os: ubuntu-latest diff --git a/lib/LuaGate/CMakeLists.txt b/lib/LuaGate/CMakeLists.txt index 635d88bd..a4d9ad74 100644 --- a/lib/LuaGate/CMakeLists.txt +++ b/lib/LuaGate/CMakeLists.txt @@ -18,9 +18,14 @@ 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}) +if (NOT LUA_FOUND) + if (EXISTS ${CMAKE_SOURCE_DIR}/include/lua.hpp) + message("Using local lua") + set(LUA_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include/) + set(LUA_LIBRARIES ${CMAKE_SOURCE_DIR}) + else() + message(FATAL_ERROR "Lua could not be found.") + endif() endif() add_library(LuaGate STATIC ${SRC} ${HEADERS})