Explorar el Código

CMake: Override PYTHON environment variable for libunicorn

spycrab hace 8 años
padre
commit
33778e4984
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      CMakeLists.txt

+ 3 - 1
CMakeLists.txt

@@ -240,8 +240,10 @@ if (NOT UNICORN_FOUND)
         set(LIBUNICORN_INCLUDE_DIR "${UNICORN_PREFIX}/include" CACHE PATH "Path to Unicorn headers" FORCE)
         set(UNICORN_DLL_DIR "${UNICORN_PREFIX}/" CACHE PATH "Path to unicorn dynamic library" FORCE)
 
+        find_package(PythonInterp 2.7 REQUIRED)
+
         add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY}
-            COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" /bin/sh make.sh
+            COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh
             WORKING_DIRECTORY ${UNICORN_PREFIX}
         )
         # ALL makes this custom target build every time