try fix cmake

This commit is contained in:
Bluub
2021-06-15 17:50:08 +02:00
parent 0b98cf771d
commit d1174fa1e1
2 changed files with 1 additions and 14 deletions
+1 -2
View File
@@ -3,10 +3,9 @@ project(bomberman)
set(CMAKE_CXX_STANDARD 20)
find_package(Lua QUIET)
if (NOT LUA_FOUND)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../lib/lua)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/lib/lua)
find_package(Lua REQUIRED)
endif()
-12
View File
@@ -40,18 +40,6 @@ This is because, the lua location is not standardized and may exist in
locations other than lua/
#]=======================================================================]
if (NOT LUA_FOUND)
INCLUDE(FetchContent)
FetchContent_Declare(lua URL https://www.lua.org/ftp/lua-5.4.3.tar.gz)
FetchContent_GetProperties(lua)
if (NOT lua_POPULATED)
SET(FETCHCONTENT_QUIET NO)
FetchContent_Populate(lua)
ADD_SUBDIRECTORY(${lua_SOURCE_DIR})
endif()
endif()
cmake_policy(PUSH) # Policies apply to functions at definition-time
cmake_policy(SET CMP0012 NEW) # For while(TRUE)