From f8b3ccaa4edd4836885dc3e22062b69e80883f36 Mon Sep 17 00:00:00 2001 From: Loïc Collignon Date: Thu, 26 Oct 2017 16:27:49 +0200 Subject: add nfc pam module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Icc42361f64948e2c2ab082fa973793f19737df2d Signed-off-by: Loïc Collignon --- pam_agl/CMakeLists.txt | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'pam_agl/CMakeLists.txt') diff --git a/pam_agl/CMakeLists.txt b/pam_agl/CMakeLists.txt index 17c85be..7cd39cc 100644 --- a/pam_agl/CMakeLists.txt +++ b/pam_agl/CMakeLists.txt @@ -25,22 +25,29 @@ include(FindPkgConfig) set(PAM_INCLUDE_DIR "/usr/include/") set(PAM_LIBRARY "/lib64/libpam.so.0") include_directories(${PAM_INCLUDE_DIR}) +if (NOT DEFINED CMAKE_INSTALL_LIBDIR) + get_filename_component(CMAKE_INSTALL_LIBDIR ${PAM_LIBRARY} DIRECTORY) +endif() # Find json-c pkg_check_modules(${JSON_C} REQUIRED json-c) include_directories(${${JSON_C}_INCLUDE_DIRS}) add_compile_options(${${JSON_C}_CFLAGS}) -# Add the target -add_library(pam_agl SHARED pam_agl.c) -target_link_libraries(pam_agl ${PAM_LIBRARY} ${${JSON_C}_LIBRARIES}) -#list (APPEND link_libraries ${${JSON_C}_LDFLAGS}) -set_property(TARGET pam_agl PROPERTY POSITION_INDEPENDENT_CODE ON) -set_property(TARGET pam_agl PROPERTY PREFIX "") +# Add the pam_agl_usb target +add_library(pam_agl_usb SHARED pam_agl_usb.c) +target_link_libraries(pam_agl_usb ${PAM_LIBRARY} ${${JSON_C}_LIBRARIES}) +set_property(TARGET pam_agl_usb PROPERTY POSITION_INDEPENDENT_CODE ON) +set_property(TARGET pam_agl_usb PROPERTY PREFIX "") -if (NOT DEFINED CMAKE_INSTALL_LIBDIR) - get_filename_component(CMAKE_INSTALL_LIBDIR ${PAM_LIBRARY} DIRECTORY) -endif() +install(TARGETS pam_agl_usb + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/security/") + +# Add the pam_agl_nfc target +add_library(pam_agl_nfc SHARED pam_agl_nfc.c) +target_link_libraries(pam_agl_nfc ${PAM_LIBRARY} ${${JSON_C}_LIBRARIES}) +set_property(TARGET pam_agl_nfc PROPERTY POSITION_INDEPENDENT_CODE ON) +set_property(TARGET pam_agl_nfc PROPERTY PREFIX "") -install(TARGETS pam_agl +install(TARGETS pam_agl_nfc LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/security/") -- cgit 1.2.3-korg