FindPerlLibs
Finds Perl libraries:
find_package(PerlLibs [<version>] [...])
Perl is a general-purpose, interpreted, dynamic programming language.
This module detects whether Perl interpreter is installed via the FindPerl module and determines the locations of Perl include paths, libraries, and the library name.
Result Variables
This module defines the following variables:
-
PerlLibs_FOUND -
Added in version 3.3.
Boolean indicating whether (the requested version of)
<perl.h>andlibperlwere found. -
PerlLibs_VERSION -
Added in version 4.2.
The version of Perl library found.
-
PERL_SITESEARCH -
Path to the sitesearch install directory (
-V:installsitesearch). -
PERL_SITEARCH -
Path to the sitelib install directory (
-V:installsitearch). -
PERL_SITELIB -
Path to the sitelib install directory (
-V:installsitelib). -
PERL_VENDORARCH -
Path to the vendor arch install directory (
-V:installvendorarch). -
PERL_VENDORLIB -
Path to the vendor lib install directory (
-V:installvendorlib). -
PERL_ARCHLIB -
Path to the core arch lib install directory (
-V:archlib). -
PERL_PRIVLIB -
Path to the core priv lib install directory (
-V:privlib). -
PERL_UPDATE_ARCHLIB -
Path to the update arch lib install directory (
-V:installarchlib). -
PERL_UPDATE_PRIVLIB -
Path to the update priv lib install directory (
-V:installprivlib). -
PERL_EXTRA_C_FLAGS -
Compilation flags used to build Perl.
Cache Variables
The following cache variables may also be set:
-
PERL_INCLUDE_PATH -
Directory containing
perl.hand other Perl header files. -
PERL_LIBRARY -
Path to the
libperl. -
PERL_EXECUTABLE -
Full path to the
perlexecutable.
Deprecated Variables
The following variables are provided for backward compatibility:
-
PERLLIBS_FOUND -
Deprecated since version 4.2: Use
PerlLibs_FOUND, which has the same value.Boolean indicating whether (the requested version of)
<perl.h>andlibperlwere found.
Examples
Finding Perl libraries and specifying the minimum required version:
find_package(PerlLibs 6.0)
See Also
- The
FindPerlmodule to find the Perl interpreter.
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindPerlLibs.html