compile with swig files if available

This commit is contained in:
Philippe Teuwen 2020-11-11 00:03:58 +01:00
commit f37088095b
17 changed files with 198 additions and 593 deletions

View file

@ -455,6 +455,28 @@ else (SKIPWHEREAMISYSTEM EQUAL 1)
message(STATUS "Whereami library: system library not found, using local library")
endif (WHEREAMI_FOUND)
endif (SKIPWHEREAMISYSTEM EQUAL 1)
# Lua SWIG
if (EXISTS ${PM3_ROOT}/client/src/pm3_luawrap.c)
set (TARGET_SOURCES
${PM3_ROOT}/client/src/pm3_luawrap.c
${TARGET_SOURCES})
add_definitions(-DHAVE_LUA_SWIG)
message(STATUS "Lua SWIG: wrapper found")
endif (EXISTS ${PM3_ROOT}/client/src/pm3_luawrap.c)
# Python SWIG
if (NOT SKIPPYTHON EQUAL 1)
if (PYTHON3EMBED_FOUND OR PYTHON3_FOUND)
if (EXISTS ${PM3_ROOT}/client/src/pm3_pywrap.c)
set (TARGET_SOURCES
${PM3_ROOT}/client/src/pm3_pywrap.c
${TARGET_SOURCES})
add_definitions(-DHAVE_PYTHON_SWIG)
message(STATUS "Python SWIG: wrapper found")
endif (EXISTS ${PM3_ROOT}/client/src/pm3_pywrap.c)
endif (PYTHON3EMBED_FOUND OR PYTHON3_FOUND)
endif (NOT SKIPPYTHON EQUAL 1)
message(STATUS "===================================================================")
add_executable(proxmark3