Skip to content

Commit dec78ae

Browse files
itcarrollhenryiii
authored andcommitted
fix install path, apply fPIC flag
1 parent 5c11213 commit dec78ae

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

projects/hello-f2py/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ find_package(PythonExtensions REQUIRED)
66
find_package(NumPy REQUIRED)
77
find_package(F2PY REQUIRED)
88

9+
# see https://github.com/scikit-build/scikit-build/pull/495/
10+
set_target_properties(_f2py_runtime_library PROPERTIES POSITION_INDEPENDENT_CODE ON)
11+
912
add_subdirectory(hello_f2py)

projects/hello-f2py/hello_f2py/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ python_extension_module(_hello)
55
target_link_libraries(_hello ${F2PY_LIBRARIES})
66
target_include_directories(_hello PRIVATE ${F2PY_INCLUDE_DIRS})
77

8-
install(TARGETS _hello LIBRARY DESTINATION hello)
8+
install(TARGETS _hello LIBRARY DESTINATION hello_f2py)

0 commit comments

Comments
 (0)