<commit_before>project(pam_kwallet)
cmake_minimum_required(VERSION 2.8.8)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" )

find_package(PAM REQUIRED)
find_package(LibGcrypt 1.5.0 REQUIRED)
include(GNUInstallDirs)

include_directories (
   ${PAM_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
)

set(library_name "pam_kwallet")

if ("${KWALLET5}" STREQUAL "1")
    add_definitions(-DKWALLET5)
    set(library_name "pam_kwallet5")
endif()

set(pam_kwallet_SRCS
   pam_kwallet.c
)

add_library (${library_name} SHARED ${pam_kwallet_SRCS})
set_target_properties (${library_name} PROPERTIES PREFIX "")
target_link_libraries (${library_name}
   ${PAM_LIBRARIES}
   ${LIBGCRYPT_LIBRARIES}
)

install(TARGETS ${library_name} DESTINATION /${CMAKE_INSTALL_LIBDIR}/security)<commit_msg>Build for KWallet5 by default<commit_after>project(pam_kwallet)
cmake_minimum_required(VERSION 2.8.8)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" )

find_package(PAM REQUIRED)
find_package(LibGcrypt 1.5.0 REQUIRED)
include(GNUInstallDirs)

include_directories (
   ${PAM_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
)

add_definitions(-DKWALLET5)
set(library_name "pam_kwallet5")

if ("${KWALLET4}" STREQUAL "1")
    remove_definitions(-DKWALLET5)
    set(library_name "pam_kwallet")
endif()

set(pam_kwallet_SRCS
   pam_kwallet.c
)

add_library (${library_name} SHARED ${pam_kwallet_SRCS})
set_target_properties (${library_name} PROPERTIES PREFIX "")
target_link_libraries (${library_name}
   ${PAM_LIBRARIES}
   ${LIBGCRYPT_LIBRARIES}
)

install(TARGETS ${library_name} DESTINATION /${CMAKE_INSTALL_LIBDIR}/security)
{'fraction_non_alphanumeric': 0.11852293031566409, 'fraction_numerical': 0.013103037522334724, 'mean_word_length': 7.795811518324608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2302680', 'n_tokens_mistral': 716, 'n_tokens_neox': 684, 'n_words': 90}