Skip to content

Commit

Permalink
Merge pull request microsoft#1999 from alex85k/lua-fix
Browse files Browse the repository at this point in the history
[lua] fix static build
ras0219-msft authored Oct 17, 2017
2 parents 6318367 + 1211c77 commit ed7c765
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ports/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS )
ADD_LIBRARY ( lua ${SRC_LIBLUA} )

IF (BUILD_SHARED_LIBS)
TARGET_COMPILE_DEFINITIONS (lua PRIVATE -DLUA_BUILD_AS_DLL )
TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_BUILD_AS_DLL )
ENDIF ()

INSTALL ( TARGETS lua
@@ -55,11 +55,11 @@ INSTALL ( TARGETS lua
)

IF (NOT DEFINED SKIP_INSTALL_TOOLS)
ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler
ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly.
ADD_EXECUTABLE ( luai src/lua.c ) # interpreter
TARGET_LINK_LIBRARIES ( luai lua )
SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai )
INSTALL ( TARGETS luai luac lua RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools )
INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua )
ENDIF ()

IF (NOT DEFINED SKIP_INSTALL_HEADERS)
2 changes: 1 addition & 1 deletion ports/lua/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: lua
Version: 5.3.4-2
Version: 5.3.4-4
Description: a powerful, fast, lightweight, embeddable scripting language
2 changes: 2 additions & 0 deletions ports/lua/portfile.cmake
Original file line number Diff line number Diff line change
@@ -35,6 +35,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/luaconf.h "${LUA_CONF_H}")
endif()

vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lua)

# Handle copyright
file(COPY ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lua)
vcpkg_copy_pdbs()

0 comments on commit ed7c765

Please sign in to comment.