cutter/dist/MacOSBundlePython.cmake.in

21 lines
612 B
CMake
Raw Normal View History

2020-12-06 18:00:13 +00:00
set(EMBED_PYTHON_SH "@EMBED_PYTHON_SH@")
set(PYTHON_FRAMEWORK_DIR "@PYTHON_FRAMEWORK_DIR@")
set(PYSIDE_PREFIX "@PYSIDE_PREFIX@")
get_filename_component(BUNDLE_PATH "${CMAKE_INSTALL_PREFIX}/../.." ABSOLUTE)
set(ENV{PKG_CONFIG_PATH} "${PYSIDE_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
# TODO: instead of calling a shellscript, implement the whole thing in cmake
execute_process(COMMAND
"${EMBED_PYTHON_SH}"
"${PYTHON_FRAMEWORK_DIR}"
"${BUNDLE_PATH}"
"${BUNDLE_PATH}/Contents/MacOS/cutter"
2020-12-06 18:00:13 +00:00
RESULT_VARIABLE SCRIPT_RESULT)
if(SCRIPT_RESULT)
message(FATAL_ERROR "Failed to bundle python")
endif()