summaryrefslogtreecommitdiff
path: root/science/py-arbor/files/patch-CMakeLists.txt
blob: b8d189dbb2b468f44a1e4d175e281148bd5709c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- CMakeLists.txt.orig	2024-08-09 10:22:00 UTC
+++ CMakeLists.txt
@@ -1,3 +1,7 @@
+cmake_minimum_required(VERSION 3.19)
+
+find_package(Python3 ${arb_py_version} COMPONENTS Interpreter Development REQUIRED)
+
 include(GNUInstallDirs)
 
 set(PYBIND11_CPP_STANDARD -std=c++17)
@@ -84,14 +88,14 @@ endif()
 endif()
 
 # For unit tests on C++ side of Python wrappers
-add_subdirectory(test)
+#add_subdirectory(test)
 
 # Create the Python module in the build directory.
 # The module contains the dynamic library, __init__.py and VERSION information.
 set(python_mod_path "${CMAKE_CURRENT_BINARY_DIR}/arbor")
 set_target_properties(pyarb PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${python_mod_path}")
-file(COPY "${PROJECT_SOURCE_DIR}/python/__init__.py" DESTINATION "${python_mod_path}")
-file(COPY "${PROJECT_SOURCE_DIR}/VERSION" DESTINATION "${python_mod_path}")
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py" DESTINATION "${python_mod_path}")
+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DESTINATION "${python_mod_path}")
 
 # Set the installation path
 
@@ -121,5 +125,4 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py 
 
 install(TARGETS pyarb DESTINATION ${_python_module_install_path})
 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py DESTINATION ${_python_module_install_path})
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stubs/arbor/ DESTINATION ${_python_module_install_path})
-install(FILES ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/README.md ${PROJECT_SOURCE_DIR}/LICENSE DESTINATION ${_python_module_install_path})
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION DESTINATION ${_python_module_install_path})