From 3cb5d34ced6f57c19b524b959ffb3101f9fedc2f Mon Sep 17 00:00:00 2001 From: maelstrom Date: Fri, 2 May 2025 23:12:42 +0200 Subject: [PATCH] chore: ported lua to vcpkg --- core/CMakeLists.txt | 4 +++- core/src/lua.h | 8 ++++---- vcpkg.json | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 923287e..02f5d8c 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -14,6 +14,7 @@ include_directories(${Stb_INCLUDE_DIR}) # PkgConfig packages find_package(PkgConfig REQUIRED) pkg_check_modules(LUAJIT REQUIRED luajit) +link_directories(${LUAJIT_LIBRARY_DIRS}) # Run autogen file(GLOB_RECURSE AUTOGEN_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src" "src/objects/*.h" "src/datatypes/*.h" "src/enum/*.h") @@ -42,8 +43,9 @@ file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.h") list(APPEND SOURCES ${AUTOGEN_OUTS}) add_library(openblocks STATIC ${SOURCES}) set_target_properties(openblocks PROPERTIES OUTPUT_NAME "openblocks") +target_link_directories(openblocks PUBLIC ${LUAJIT_LIBRARY_DIRS}) target_link_libraries(openblocks ${GLEW_LIBRARIES} ${LUAJIT_LIBRARIES} OpenGL::GL ReactPhysics3D::ReactPhysics3D pugixml::pugixml) -target_include_directories(openblocks PUBLIC "src" "../include" ${LUAJIT_INCLUDE_DIR}) +target_include_directories(openblocks PUBLIC "src" "../include" ${LUAJIT_INCLUDE_DIRS}) add_dependencies(openblocks autogen_build autogen) # Windows-specific dependencies diff --git a/core/src/lua.h b/core/src/lua.h index 73131b5..9f7b670 100644 --- a/core/src/lua.h +++ b/core/src/lua.h @@ -1,7 +1,7 @@ #pragma once extern "C" { - #include - #include - #include - #include + #include + #include + #include + #include } \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 69bee7a..7d9516a 100755 --- a/vcpkg.json +++ b/vcpkg.json @@ -6,7 +6,9 @@ { "name": "pugixml", "version>=": "1.15" }, "sdl2", "stb", - "reactphysics3d" + "reactphysics3d", + "pkgconf", + "luajit" ], "overrides": [ {