diff options
author | nicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-08-18 23:07:22 +0000 |
---|---|---|
committer | nicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-08-18 23:07:22 +0000 |
commit | 864e3a3e45f5a786194ab9dd6f5d3b83d700c507 (patch) | |
tree | 777cb2f0fc6a0d4423c054da726a8ecf063cb6b7 /bindings/perl | |
parent | 899ba91efd073d498b125a3c5414ae576392404e (diff) | |
download | libproxy-git-864e3a3e45f5a786194ab9dd6f5d3b83d700c507.tar.gz |
Enable VENDORARCH option and PX_PERL_ARCH override
Diffstat (limited to 'bindings/perl')
-rw-r--r-- | bindings/perl/CMakeLists.txt | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/bindings/perl/CMakeLists.txt b/bindings/perl/CMakeLists.txt index 29495bc..983ca86 100644 --- a/bindings/perl/CMakeLists.txt +++ b/bindings/perl/CMakeLists.txt @@ -3,17 +3,23 @@ include (FindPerlLibs) if(PERL_FOUND AND PERLLIBS_FOUND) - # Some distributions install perl packages in vendor when shipped with the distro. - # Let's make their lifes easier by offering an install flag for this usecase. - if(PERL_VENDORINSTALL) - set (PX_PERL_ARCH ${PERL_VENDORARCH}) - set (PX_PERL_LIB ${PERL_VENDORLIB}) - else() - # PERL_SITEARCH is actually not defined in latest FindPerlLibs.cmake macros, thus - # we have to find the correct path on our own. - EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{sitearch}" - OUTPUT_VARIABLE PX_PERL_ARCH) - set (PX_PERL_LIB ${PERL_SITELIB}) + # Enable override of perl packge install directory. + set(PX_PERL_ARCH ${PX_PERL_ARCH} CACHE PATH "Install directory for Perl package.") + + if(NOT PX_PERL_ARCH) + # Some distributions install perl packages in vendor when shipped with the distro. + # Let's make their lifes easier by offering an install flag for this usecase. + option(PERL_VENDORINSTALL "Install Perl package in vendor directory" OFF) + if(PERL_VENDORINSTALL) + set (PX_PERL_ARCH ${PERL_VENDORARCH}) + set (PX_PERL_LIB ${PERL_VENDORLIB}) + else() + # PERL_SITEARCH is actually not defined in latest FindPerlLibs.cmake macros, thus + # we have to find the correct path on our own. + EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{sitearch}" + OUTPUT_VARIABLE PX_PERL_ARCH) + set (PX_PERL_LIB ${PERL_SITELIB}) + endif() endif() add_subdirectory(lib) |