ソースを参照

FindPerlLibs: Add versioned perl library name for Cygwin

Based on downstream patch from Cygwin package for CMake by Marco Atzeri:

* https://github.com/matzeri/cygwin-pkg/blob/64864eb8f0d635ea44226e4b9a41a7ca59a1c7dd/cmake/perl-libs.patch
Lemures Lemniscati 5 年 前
コミット
24482499ea
1 ファイル変更3 行追加0 行削除
  1. 3 0
      Modules/FindPerlLibs.cmake

+ 3 - 0
Modules/FindPerlLibs.cmake

@@ -108,6 +108,9 @@ if (PERL_EXECUTABLE)
   if (NOT PERL_POSSIBLE_LIBRARY_NAMES)
   if (NOT PERL_POSSIBLE_LIBRARY_NAMES)
     set(PERL_POSSIBLE_LIBRARY_NAMES perl${PERL_VERSION_STRING} perl)
     set(PERL_POSSIBLE_LIBRARY_NAMES perl${PERL_VERSION_STRING} perl)
   endif()
   endif()
+  if(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+    list (APPEND PERL_POSSIBLE_LIBRARY_NAMES perl${PERL_VERSION_STRING})
+  endif()
   if (CMAKE_SYSTEM_NAME MATCHES "MSYS|CYGWIN")
   if (CMAKE_SYSTEM_NAME MATCHES "MSYS|CYGWIN")
     # on MSYS and CYGWIN environments, current perl -V:libperl gives shared library name
     # on MSYS and CYGWIN environments, current perl -V:libperl gives shared library name
     # rather than the import library. So, extends possible library names
     # rather than the import library. So, extends possible library names