Commit abdf4114 authored by Jan Möbius's avatar Jan Möbius

Makefiles for python support

parent 5c97cd8e
include (ACGCommon)
include_directories (
..
${OPENMESH_INCLUDE_DIRS}
......@@ -68,9 +69,19 @@ set (directories
../widgets/snapshotDialog
../widgets/stereoSettingsWidget
../widgets/postProcessorWidget
../widgets/pythonWidget
../widgets/rendererWidget
${WIN_EXTRA_DIRS}
)
if ( PYTHON3_FOUND)
include_directories (
${Python3_INCLUDE_DIRS}
)
list(APPEND directories "../PythonInterpreter")
endif()
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
......@@ -118,9 +129,15 @@ elseif (APPLE)
# generate bundle on mac
acg_add_executable (${OPENFLIPPER_PRODUCT_STRING} MACOSX_BUNDLE ${sources} ${headers} ${RC_SRC})
else ()
acg_add_executable (${OPENFLIPPER_PRODUCT_STRING} ${sources} ${headers} ${RC_SRC})
acg_add_executable (${OPENFLIPPER_PRODUCT_STRING} ${sources} ${headers} ${RC_SRC} )
endif ()
if ( PYTHON3_FOUND)
target_link_libraries(${OPENFLIPPER_PRODUCT_STRING} ${PYTHON_LIBRARY} pybind11::module pybind11::embed)
add_definitions(-DPYTHON_ENABLED )
endif()
# Mark this build part as building OpenFlippers Core
add_definitions(-DOPENFLIPPERCORE )
......
......@@ -77,6 +77,18 @@ file (
)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_more_macro_directories})
# ========================================================================
# Python support
# ========================================================================
find_package(Python3 COMPONENTS Development)
if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
add_subdirectory(OpenFlipper/libs_required/pybind11)
endif()
# ========================================================================
# QT Setup
# ========================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment