Skip to content

Commit 893680d

Browse files
committed
python/CMakeLists.txt: Fix install destination
1 parent bd26b76 commit 893680d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/python/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ else()
1212
# The Python package is installed directly in the folder of the
1313
# detected interpreter (system, user, or virtualenv)
1414
set(S2GEOMETRY_INSTALL_PREFIX ${Python3_SITELIB})
15+
execute_process(COMMAND ${Python3_EXECUTABLE} -c
16+
"import sys, sysconfig; print(sysconfig.get_path('platlib').replace(sys.prefix+'/','')+'/s2geometry')"
17+
OUTPUT_VARIABLE S2GEOMETRY_INSTALL_PREFIX
18+
OUTPUT_STRIP_TRAILING_WHITESPACE)
1519
endif()
1620

1721
include(${SWIG_USE_FILE})

0 commit comments

Comments
 (0)