forked from ILLGrenoble/visa-pam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (34 loc) · 1.26 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.5)
project(pam_visa C)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 11)
find_package(PAM REQUIRED)
find_package(SSL REQUIRED)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
enable_testing()
add_subdirectory(tests)
file(GLOB_RECURSE SOURCES src/*.c src/.h)
set(CMAKE_SHARED_MODULE_PREFIX "")
add_library(${PROJECT_NAME} MODULE ${SOURCES})
target_link_libraries(
${PROJECT_NAME}
${PAM_LIBRARIES}
${SSL_LIBRARIES}
)
# install the module in the same place where all the other modules should be
# NOTE: we actually disrespect the install prefix here
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
get_filename_component(CMAKE_INSTALL_LIBDIR ${PAM_LIBRARY} DIRECTORY)
endif()
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION "/lib/x86_64-linux-gnu/security/"
)
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_VERSION_MAJOR 1)
SET(CPACK_PACKAGE_VERSION_MINOR 0)
SET(CPACK_PACKAGE_VERSION_PATCH 2)
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "[email protected]") #required
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Linux PAM module to enable authentication through the verification of a signature against a public key")
INCLUDE(CPack)