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

Makefiles for python support

parent 5c97cd8e
include (ACGCommon) include (ACGCommon)
include_directories ( include_directories (
.. ..
${OPENMESH_INCLUDE_DIRS} ${OPENMESH_INCLUDE_DIRS}
...@@ -68,9 +69,19 @@ set (directories ...@@ -68,9 +69,19 @@ set (directories
../widgets/snapshotDialog ../widgets/snapshotDialog
../widgets/stereoSettingsWidget ../widgets/stereoSettingsWidget
../widgets/postProcessorWidget ../widgets/postProcessorWidget
../widgets/pythonWidget
../widgets/rendererWidget ../widgets/rendererWidget
${WIN_EXTRA_DIRS} ${WIN_EXTRA_DIRS}
) )
if ( PYTHON3_FOUND)
include_directories (
${Python3_INCLUDE_DIRS}
)
list(APPEND directories "../PythonInterpreter")
endif()
# collect all header,source and ui files # collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories}) acg_append_files (headers "*.hh" ${directories})
...@@ -118,9 +129,15 @@ elseif (APPLE) ...@@ -118,9 +129,15 @@ elseif (APPLE)
# generate bundle on mac # generate bundle on mac
acg_add_executable (${OPENFLIPPER_PRODUCT_STRING} MACOSX_BUNDLE ${sources} ${headers} ${RC_SRC}) acg_add_executable (${OPENFLIPPER_PRODUCT_STRING} MACOSX_BUNDLE ${sources} ${headers} ${RC_SRC})
else () else ()
acg_add_executable (${OPENFLIPPER_PRODUCT_STRING} ${sources} ${headers} ${RC_SRC}) acg_add_executable (${OPENFLIPPER_PRODUCT_STRING} ${sources} ${headers} ${RC_SRC} )
endif () 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 # Mark this build part as building OpenFlippers Core
add_definitions(-DOPENFLIPPERCORE ) add_definitions(-DOPENFLIPPERCORE )
......
...@@ -77,6 +77,18 @@ file ( ...@@ -77,6 +77,18 @@ file (
) )
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_more_macro_directories}) 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 # 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