fixed FindPIP with Lua

This commit is contained in:
2020-07-24 14:04:19 +03:00
parent e63aab40f6
commit cdbc401616
2 changed files with 12 additions and 5 deletions

View File

@@ -97,10 +97,17 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
endif()
endif()
if(PIP_LUA_LIBRARY)
if(MINGW)
set(LUA_INCLUDE_DIR ${MINGW_INCLUDE})
if (NOT LUA_FOUND)
if(MINGW)
set(LUA_INCLUDE_DIR ${MINGW_INCLUDE})
set(_prev_clp "${CMAKE_LIBRARY_PATH}")
set(CMAKE_LIBRARY_PATH "${MINGW_LIB}")
endif()
find_package(Lua QUIET)
if(MINGW)
set(CMAKE_LIBRARY_PATH "${_prev_clp}")
endif()
endif()
find_package(Lua QUIET)
endif()
if(NOT PIP_VERSION)
@@ -157,7 +164,7 @@ if(__module_Cloud AND __module_IOUtils)
set_target_properties(PIP::Cloud PROPERTIES INTERFACE_LINK_LIBRARIES "PIP::IOUtils")
endif()
if(__module_Lua)
set_target_properties(PIP::Lua PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}" INTERFACE_LINK_LIBRARIES "PIP ${LUA_LIBRARIES}")
set_target_properties(PIP::Lua PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}" INTERFACE_LINK_LIBRARIES "PIP;${LUA_LIBRARIES}")
endif()
include(PIPMacros)