Move FindLua to main cmake file
This commit is contained in:
		| @@ -7,6 +7,10 @@ set(CMAKE_CXX_FLAGS_RELEASE -O2) | |||||||
| option(LUA_ENABLED "Lua scripting support" ON) | option(LUA_ENABLED "Lua scripting support" ON) | ||||||
| if (LUA_ENABLED) | if (LUA_ENABLED) | ||||||
|   add_compile_definitions(LUA_SCRIPTING) |   add_compile_definitions(LUA_SCRIPTING) | ||||||
|  |   ## Find Lua | ||||||
|  |   ## Do it here because it's needed in a bunch of places and the debian cmake is a stickler | ||||||
|  |   find_package(Lua REQUIRED) | ||||||
|  |   include_directories(${LUA_INCLUDE_DIR}) | ||||||
| endif () | endif () | ||||||
| add_executable(couch core/couch.cpp) | add_executable(couch core/couch.cpp) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,12 +11,6 @@ find_package(Bullet REQUIRED) | |||||||
| ## Find AssImp | ## Find AssImp | ||||||
| find_package(ASSIMP REQUIRED) | find_package(ASSIMP REQUIRED) | ||||||
|  |  | ||||||
| if (LUA_ENABLED) |  | ||||||
| ## Find Lua |  | ||||||
| find_package(Lua REQUIRED) |  | ||||||
| include_directories(${LUA_INCLUDE_DIR}) |  | ||||||
| endif () |  | ||||||
|  |  | ||||||
| add_library(couchlib STATIC) | add_library(couchlib STATIC) | ||||||
| target_sources(couchlib PUBLIC | target_sources(couchlib PUBLIC | ||||||
|   Camera.h |   Camera.h | ||||||
|   | |||||||
| @@ -5,8 +5,6 @@ set_property(SOURCE couch.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES ON) | |||||||
|  |  | ||||||
| if (LUA_ENABLED) | if (LUA_ENABLED) | ||||||
|   ## Find Lua |   ## Find Lua | ||||||
|   find_package(Lua REQUIRED) |  | ||||||
|  |  | ||||||
|   swig_add_library(couchlua |   swig_add_library(couchlua | ||||||
|     TYPE STATIC |     TYPE STATIC | ||||||
|     LANGUAGE lua |     LANGUAGE lua | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dane Johnson
					Dane Johnson