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 | cbd1c589bfaaa7ea50b1ecd6b5b210348087a725 (patch) | |
tree | 777cb2f0fc6a0d4423c054da726a8ecf063cb6b7 | |
parent | fa256fdd98fcc4b14c8045be2fa235013d1b6afa (diff) | |
download | libproxy-cbd1c589bfaaa7ea50b1ecd6b5b210348087a725.tar.gz |
Enable VENDORARCH option and PX_PERL_ARCH override
git-svn-id: http://libproxy.googlecode.com/svn/trunk@729 c587cffe-e639-0410-9787-d7902ae8ed56
-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) |