Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
abdf4114
Commit
abdf4114
authored
Jan 23, 2019
by
Jan Möbius
Browse files
Makefiles for python support
parent
5c97cd8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
CoreApp/CMakeLists.txt
View file @
abdf4114
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
)
...
...
cmake/CMakeLists.txt
View file @
abdf4114
...
...
@@ -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
# ========================================================================
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment