Skip to content

Commit

Permalink
check for default prefix before (possibly) munging with prefix string
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Dec 16, 2023
1 parent 6549f7f commit f70f38e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions swig/perl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ include(FindPerlLibs)
string(SUBSTRING "${PERL_VERSION_STRING}" 0 4 PERL_VERSION_MINOR)

# process cmake vendor paths to respect install prefix, use as Linux defaults below
STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDORARCH "${PERL_VENDORARCH}")
STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDORLIB "${PERL_VENDORLIB}")
if (NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDORARCH "${PERL_VENDORARCH}")
STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDORLIB "${PERL_VENDORLIB}")
endif()

message(STATUS "perl install libdir: ${PERL_VENDORARCH}")
message(STATUS "perl install archdir: ${PERL_VENDORLIB}")

Expand Down

0 comments on commit f70f38e

Please sign in to comment.