vcpkg/ports/luv/fix-find-lua-compat53.patch
kylo252 4fa284dc00
[luv] add new port (#26438)
* [luv] add new port

libuv bindings for lua

* [lua-compat53] add new port

* fixup!: bad indentation

* refactor: remove superfluous feature desc
2022-10-14 16:01:28 -07:00

29 lines
756 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e63a431..1f144c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,13 +231,7 @@ if(APPLE)
# )
endif()
-if(NOT LUA_COMPAT53_DIR)
- set(LUA_COMPAT53_DIR deps/lua-compat-5.3)
-endif()
-if(DEFINED ENV{LUA_COMPAT53_DIR})
- set(LUA_COMPAT53_DIR $ENV{LUA_COMPAT53_DIR})
-endif()
-include_directories(${LUA_COMPAT53_DIR}/c-api)
+find_path(LUA_COMPAT53_INCLUDE_DIRS "compat-5.3.h")
if(WIN32)
add_definitions(-DLUA_BUILD_AS_DLL -DLUA_LIB)
@@ -263,6 +257,7 @@ foreach(TARGET_NAME ${ACTIVE_TARGETS})
else()
target_link_libraries(${TARGET_NAME} ${LIBUV_LIBRARIES})
endif()
+ target_include_directories(${TARGET_NAME} PRIVATE ${LUA_COMPAT53_INCLUDE_DIRS})
endforeach()
if (NOT LUA)