aboutsummaryrefslogtreecommitdiff
path: root/graphics/py-f3d/files/patch-CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/py-f3d/files/patch-CMakeLists.txt')
-rw-r--r--graphics/py-f3d/files/patch-CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/graphics/py-f3d/files/patch-CMakeLists.txt b/graphics/py-f3d/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..434d9bd56e1a
--- /dev/null
+++ b/graphics/py-f3d/files/patch-CMakeLists.txt
@@ -0,0 +1,28 @@
+--- CMakeLists.txt.orig 2022-09-07 10:17:51 UTC
++++ CMakeLists.txt
+@@ -1,10 +1,13 @@
++cmake_minimum_required(VERSION 3.12)
++find_package(Python COMPONENTS Interpreter Development)
+ find_package(pybind11 2.2 REQUIRED)
++set(CMAKE_INSTALL_LIBDIR lib)
+
+ pybind11_add_module(pyf3d F3DPythonBindings.cxx)
+
+ target_compile_features(pyf3d PRIVATE cxx_std_14)
+
+-target_link_libraries(pyf3d PRIVATE libf3d)
++target_link_libraries(pyf3d PRIVATE f3d)
+
+ set_target_properties(pyf3d PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
+@@ -23,6 +26,10 @@ endif()
+ if (APPLE OR UNIX)
+ set_target_properties(pyf3d PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+ endif ()
++
++set(PYTHON_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
++install(TARGETS pyf3d
++ LIBRARY DESTINATION ${PYTHON_INSTALL_PATH} COMPONENT pythonmodule)
+
+ # testing
+ if(BUILD_TESTING)