svn commit: r1920461 - in /subversion/branches/cmake: CMakeLists.txt build/cmake/FindPY3C.cmake build/cmake/Findpy3c.cmake
| Newsgroups | gmane.comp.version-control.subversion.svn |
|---|---|
| Message-ID | <[email protected]> |
Author: rinrab
Date: Wed Sep 4 12:38:12 2024
New Revision: 1920461
URL: http://svn.apache.org/viewvc?rev=1920461&view=rev
Log:
On the 'cmake' branch: uppercase the name of py3c library in its module name.
CMake requires the modules to be named as Find[LibraryName].cmake and they
will be accessible from find_package(LibraryName) command. However, the name
for the py3c module, Findpy3c.cmake doesn't make sense.
* build/cmake/Findpy3c.cmake: rename into FindPY3C.cmake and adjust the
names inside the file.
* CMakeLists.txt
(swig.python): Use `find_package(PY3C REQUIRED)` instead of
`find_package(py3c REQUIRED)` for the library.
Added:
subversion/branches/cmake/build/cmake/FindPY3C.cmake
- copied, changed from r1920460, subversion/branches/cmake/build/cmake/Findpy3c.cmake
Removed:
subversion/branches/cmake/build/cmake/Findpy3c.cmake
Modified:
subversion/branches/cmake/CMakeLists.txt
Modified: subversion/branches/cmake/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/branches/cmake/CMakeLists.txt?rev=1920461&r1=1920460&r2=1920461&view=diff
==============================================================================
--- subversion/branches/cmake/CMakeLists.txt (original)
+++ subversion/branches/cmake/CMakeLists.txt Wed Sep 4 12:38:12 2024
@@ -284,7 +284,7 @@ if(SVN_ENABLE_SWIG_PERL OR SVN_ENABLE_SW
endif()
if(SVN_ENABLE_SWIG_PYTHON)
- find_package(py3c REQUIRED)
+ find_package(PY3C REQUIRED)
add_library(external-python INTERFACE)
target_link_libraries(external-python INTERFACE
Copied: subversion/branches/cmake/build/cmake/FindPY3C.cmake (from r1920460, subversion/branches/cmake/build/cmake/Findpy3c.cmake)
URL: http://svn.apache.org/viewvc/subversion/branches/cmake/build/cmake/FindPY3C.cmake?p2=subversion/branches/cmake/build/cmake/FindPY3C.cmake&p1=subversion/branches/cmake/build/cmake/Findpy3c.cmake&r1=1920460&r2=1920461&rev=1920461&view=diff
==============================================================================
--- subversion/branches/cmake/build/cmake/Findpy3c.cmake (original)
+++ subversion/branches/cmake/build/cmake/FindPY3C.cmake Wed Sep 4 12:38:12 2024
@@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.
#
-# Findpy3c.cmake -- CMake module for py3c library
+# FindPY3C.cmake -- CMake module for py3c library
#
find_path(PY3C_INCLUDE_DIR
@@ -32,13 +32,13 @@ mark_as_advanced(
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
- py3c
+ PY3C
REQUIRED_VARS
PY3C_INCLUDE_DIR
)
# TODO: Is it okay to put py3c into 'Python' namespace?
-if(py3c_FOUND AND NOT TARGET Python::py3c)
+if(PY3C_FOUND AND NOT TARGET Python::py3c)
add_library(Python::py3c IMPORTED INTERFACE)
set_target_properties(Python::py3c PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${PY3C_INCLUDE_DIR}