From 30a955bc31dabd9de0c359cf492bbd2ccfaff4bb Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Wed, 7 Apr 2021 13:13:04 -0500 Subject: [PATCH] More changes for debian build --- core/CMakeLists.txt | 1 + core/Window.cpp | 2 +- scripting/CMakeLists.txt | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 8f7e82f..a9bcec9 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -94,6 +94,7 @@ target_link_libraries(couchlib OpenGL::GL) target_link_libraries(couchlib GLEW::GLEW) if (LUA_ENABLED) target_link_libraries(couchlib_luascripting ${LUA_LIBRARIES}) + target_include_directories(couchlib_luascripting PRIVATE "${LUA_INCLUDE_DIR}") endif () target_link_libraries(couchlib ${BULLET_LIBRARIES}) target_link_libraries(couchlib ${ASSIMP_LIBRARY}) diff --git a/core/Window.cpp b/core/Window.cpp index fbe0c6a..765d561 100644 --- a/core/Window.cpp +++ b/core/Window.cpp @@ -10,7 +10,7 @@ void Window::Init() { glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_FLOATING, GLFW_TRUE); -#if GLFW_VERSION_MINOR >= 2 +#if GLFW_VERSION_REVISION >= 2 glfwWindowHintString(GLFW_X11_CLASS_NAME, "Couch"); #endif diff --git a/scripting/CMakeLists.txt b/scripting/CMakeLists.txt index bd8ae6d..53bce77 100644 --- a/scripting/CMakeLists.txt +++ b/scripting/CMakeLists.txt @@ -4,12 +4,17 @@ set_property(SOURCE couch.i PROPERTY CPLUSPLUS ON) set_property(SOURCE couch.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES ON) if (LUA_ENABLED) + ## Find Lua + find_package(Lua REQUIRED) + swig_add_library(couchlua TYPE STATIC LANGUAGE lua SOURCES couch.i lua/helpers.i) - target_include_directories(couchlua PRIVATE "${PROJECT_SOURCE_DIR}/core") + target_include_directories(couchlua PRIVATE + "${PROJECT_SOURCE_DIR}/core" + "${LUA_INCLUDE_DIR}") swig_link_libraries(couchlua PRIVATE