Skip to content

Commit

Permalink
Fix lua dll build
Browse files Browse the repository at this point in the history
  • Loading branch information
shehzan10 committed Dec 23, 2015
1 parent 76ab775 commit 4ac0a64
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeModules/build_lua.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
INCLUDE(ExternalProject)

SET(prefix ${CMAKE_BINARY_DIR}/third_party/lua)
SET(lua_lib_prefix "${prefix}/lib")

SET(lua_location "${prefix}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_SHARED_LIBRARY_SUFFIX}")
IF(CMAKE_VERSION VERSION_LESS 3.2)
Expand Down Expand Up @@ -44,9 +45,15 @@ ExternalProject_Add(
${byproducts}
)

ExternalProject_Get_Property(lua-ext binary_dir)
ExternalProject_Get_Property(lua-ext install_dir)

ADD_LIBRARY(lua IMPORTED SHARED)
SET_TARGET_PROPERTIES(lua PROPERTIES IMPORTED_LOCATION ${lua_location})
IF(WIN32)
SET_TARGET_PROPERTIES(lua PROPERTIES IMPORTED_IMPLIB ${lua_lib_prefix}/lua.lib)
ENDIF(WIN32)

ADD_DEPENDENCIES(lua lua-ext)
SET(LUA_INCLUDE_DIR ${install_dir}/include)
SET(LUA_LIBRARIES lua)
Expand Down

0 comments on commit 4ac0a64

Please sign in to comment.