forked from macports/macports-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,11 @@ | ||
--- saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt.orig 2023-07-11 13:21:34.000000000 +0200 | ||
+++ saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt 2023-07-14 13:44:08.000000000 +0200 | ||
@@ -25,8 +25,8 @@ | ||
--- saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt.orig | ||
+++ saga-gis/src/saga_core/saga_api/saga_api_python/CMakeLists.txt | ||
@@ -25,7 +25,7 @@ | ||
find_package(SWIG QUIET) | ||
if(SWIG_FOUND) | ||
message(STATUS "SWIG for Python found") | ||
- find_package(Python COMPONENTS Interpreter Development) | ||
- if(Python_FOUND) | ||
+ find_package(Python3 @PYVER@ EXACT COMPONENTS Interpreter Development) | ||
+ if(Python3_FOUND) | ||
+ find_package(Python @PYVER@ EXACT COMPONENTS Interpreter Development) | ||
if(Python_FOUND) | ||
# project(saga_api_python) | ||
|
||
message(STATUS "project: ${PROJECT_NAME}") | ||
@@ -43,8 +43,8 @@ | ||
|
||
include(UseSWIG) | ||
|
||
- include_directories("${Python_INCLUDE_DIRS}") | ||
- include_directories("${Python_INCLUDE_DIRS}/../PC") # msvc builds | ||
+ include_directories("${Python3_INCLUDE_DIRS}") | ||
+ include_directories("${Python3_INCLUDE_DIRS}/../PC") # msvc builds | ||
include_directories("..") | ||
|
||
set(CMAKE_SWIG_FLAGS "-D_SAGA_PYTHON -D_SWIG_WCHAR") | ||
@@ -57,20 +57,20 @@ | ||
set_property(TARGET saga_api_python PROPERTY OUTPUT_NAME saga_api) | ||
|
||
swig_link_libraries(saga_api_python saga_api) | ||
- swig_link_libraries(saga_api_python ${Python_LIBRARIES}) | ||
+ swig_link_libraries(saga_api_python ${Python3_LIBRARIES}) | ||
|
||
|
||
- if(EXISTS ${Python_SITELIB}) | ||
+ if(EXISTS ${Python3_SITELIB}) | ||
option(WITH_PYTHON_PKG "PySAGA package installation (if not checked API modules become installed directly in Python's site/dist-packages folder)" ON) | ||
if(WITH_PYTHON_PKG) | ||
- message(STATUS "SAGA-Python-API installed to: ${Python_SITELIB}/PySAGA") | ||
- install(TARGETS saga_api_python DESTINATION ${Python_SITELIB}/PySAGA) | ||
- install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python_SITELIB}/PySAGA) | ||
- install(FILES ${CMAKE_SOURCE_DIR}/src/accessories/python/__init__.py DESTINATION ${Python_SITELIB}/PySAGA) | ||
+ message(STATUS "SAGA-Python-API installed to: ${Python3_SITELIB}/PySAGA") | ||
+ install(TARGETS saga_api_python DESTINATION ${Python3_SITELIB}/PySAGA) | ||
+ install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python3_SITELIB}/PySAGA) | ||
+ install(FILES ${CMAKE_SOURCE_DIR}/src/accessories/python/__init__.py DESTINATION ${Python3_SITELIB}/PySAGA) | ||
else() | ||
- message(STATUS "SAGA-Python-API installed to: ${Python_SITELIB}") | ||
- install(TARGETS saga_api_python DESTINATION ${Python_SITELIB}) | ||
- install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python_SITELIB}) | ||
+ message(STATUS "SAGA-Python-API installed to: ${Python3_SITELIB}") | ||
+ install(TARGETS saga_api_python DESTINATION ${Python3_SITELIB}) | ||
+ install(FILES ${CMAKE_BINARY_DIR}/src/saga_core/saga_api/saga_api_python/saga_api.py DESTINATION ${Python3_SITELIB}) | ||
endif() | ||
endif() | ||
endif() |