fix lua and luajit conflict

This commit is contained in:
Sergwest
2024-03-20 22:38:41 +03:00
parent 1571d9c73b
commit c80d96a5ed
3 changed files with 13 additions and 6 deletions
+5 -4
View File
@@ -82,6 +82,8 @@ find_package(GLEW REQUIRED)
find_package(OpenAL REQUIRED)
find_package(ZLIB REQUIRED)
set(LIBS "")
if (WIN32)
if(VOXELENGINE_BUILD_WINDOWS_VCPKG)
set(LUA_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/luajit_x64-windows/lib/lua51.lib")
@@ -99,8 +101,9 @@ if (WIN32)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/glfw)
endif()
else()
# luajit has no CMakeLists.txt to use it as subdirectory, so install it manually
find_package(Lua REQUIRED)
find_package(PkgConfig)
pkg_check_modules(LUAJIT REQUIRED luajit)
set(LUA_LIBRARIES ${LUAJIT_LIBRARIES})
find_package(PNG REQUIRED)
set(PNGLIB PNG::PNG)
set(VORBISLIB vorbis vorbisfile)
@@ -110,8 +113,6 @@ if (APPLE)
find_package(glfw3 3.3 REQUIRED)
endif ()
set(LIBS "")
if(UNIX)
find_package(Threads REQUIRED)
set(LIBS ${LIBS} Threads::Threads)