Skip to content

Commit 6549f7f

Browse files
committed
chg: dev: use cmake vendor paths for perl install defaults
* also display both vendor/non-vendor system paths in linux envs Signed-off-by: Stephen L Arnold <[email protected]>
1 parent f997cee commit 6549f7f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@ message(STATUS " ")
463463
message(STATUS "Language bindings:")
464464
message(STATUS "python3 bindings: ${ENABLE_PYTHON3}")
465465
message(STATUS "perl bindings: ${ENABLE_PERL}")
466+
message(STATUS "perl vendorlib: ${PERL_VENDORLIB}")
467+
message(STATUS "perl vendorarch: ${PERL_VENDORARCH}")
468+
message(STATUS "perl privlib: ${PERL_PRIVLIB}")
469+
message(STATUS "perl archlib: ${PERL_ARCHLIB}")
466470
message(STATUS " ")
467471

468472
message(STATUS "Utilities:")

swig/perl/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ include(FindPerlLibs)
33

44
string(SUBSTRING "${PERL_VERSION_STRING}" 0 4 PERL_VERSION_MINOR)
55

6+
# process cmake vendor paths to respect install prefix, use as Linux defaults below
7+
STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDORARCH "${PERL_VENDORARCH}")
8+
STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDORLIB "${PERL_VENDORLIB}")
9+
message(STATUS "perl install libdir: ${PERL_VENDORARCH}")
10+
message(STATUS "perl install archdir: ${PERL_VENDORLIB}")
11+
612
set(CMAKE_SWIG_FLAGS "-module" "openscap_pm")
713
if (${CMAKE_VERSION} VERSION_LESS "3.8.0")
814
swig_add_module(openscap_pm perl5 ../openscap.i)
@@ -22,7 +28,7 @@ if (APPLE OR (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"))
2228
DESTINATION ${CMAKE_INSTALL_DATADIR}/perl5/vendor_perl)
2329
else()
2430
install(TARGETS ${SWIG_MODULE_openscap_pm_REAL_NAME}
25-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/perl5/${PERL_VERSION_MINOR})
31+
DESTINATION ${PERL_VENDORARCH})
2632
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/openscap_pm.pm
27-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/perl5/vendor_perl/${PERL_VERSION_MINOR})
33+
DESTINATION ${PERL_VENDORLIB})
2834
endif()

0 commit comments

Comments
 (0)