-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
923 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FIND_PACKAGE (Lua) | ||
|
||
ADD_CUSTOM_COMMAND ( | ||
OUTPUT solv_lua.c | ||
COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} -lua -I${CMAKE_SOURCE_DIR}/src -o solv_lua.c ${CMAKE_SOURCE_DIR}/bindings/solv.i | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
DEPENDS ${CMAKE_SOURCE_DIR}/bindings/solv.i | ||
) | ||
|
||
INCLUDE_DIRECTORIES (${LUA_INCLUDE_DIR}) | ||
IF (NOT LUA_INSTALL_DIR) | ||
SET(LUA_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/lua/${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}) | ||
ENDIF (NOT LUA_INSTALL_DIR) | ||
|
||
MESSAGE (STATUS "Lua installation dir: ${LUA_INSTALL_DIR}") | ||
|
||
ADD_LIBRARY (bindings_lua SHARED solv_lua.c) | ||
SET_TARGET_PROPERTIES (bindings_lua PROPERTIES PREFIX "" OUTPUT_NAME "solv" INSTALL_NAME_DIR "${LUA_INSTALL_DIR}") | ||
TARGET_LINK_LIBRARIES (bindings_lua libsolvext libsolv ${LUA_LIBRARY} ${SYSTEM_LIBRARIES}) | ||
INSTALL (TARGETS bindings_lua LIBRARY DESTINATION ${LUA_INSTALL_DIR}) | ||
|
Oops, something went wrong.