Mercurial > hg > orthanc
diff CMakeLists.txt @ 2022:fefbe71c2272
Possibility to use PKCS#11 authentication for hardware security modules with Orthanc peers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 17 Jun 2016 17:09:50 +0200 |
parents | a0bd8cd55da7 |
children | e7e1858d9504 |
line wrap: on
line diff
--- a/CMakeLists.txt Wed Jun 15 17:20:52 2016 +0200 +++ b/CMakeLists.txt Fri Jun 17 17:09:50 2016 +0200 @@ -32,6 +32,7 @@ SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Build the ServeFolders plugin") SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Build the sample plugin to serve modality worklists") SET(USE_DCMTK_361 OFF CACHE BOOL "Use forthcoming DCMTK version 3.6.1 in static builds (instead of 3.6.0)") +SET(ENABLE_PKCS11 OFF CACHE BOOL "Enable PKCS#11 for HTTPS client authentication using hardware security modules and smart cards") # Advanced parameters to fine-tune linking against system libraries SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp") @@ -46,7 +47,8 @@ SET(USE_SYSTEM_CURL ON CACHE BOOL "Use the system version of LibCurl") SET(USE_SYSTEM_OPENSSL ON CACHE BOOL "Use the system version of OpenSSL") SET(USE_SYSTEM_ZLIB ON CACHE BOOL "Use the system version of ZLib") -SET(USE_SYSTEM_PUGIXML ON CACHE BOOL "Use the system version of Pugixml)") +SET(USE_SYSTEM_PUGIXML ON CACHE BOOL "Use the system version of Pugixml") +SET(USE_SYSTEM_LIBP11 ON CACHE BOOL "Use the system version of libp11 (PKCS#11 wrapper library)") # Experimental options SET(USE_PUGIXML ON CACHE BOOL "Use the Pugixml parser (turn off only for debug)") @@ -77,7 +79,6 @@ - ##################################################################### ## List of source files ##################################################################### @@ -331,6 +332,18 @@ endif() +if (ENABLE_PKCS11) + if (ENABLE_SSL) + add_definitions(-DORTHANC_PKCS11_ENABLED=1) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibP11Configuration.cmake) + else() + message(FATAL_ERROR "OpenSSL is required to enable PKCS#11") + endif() +else() + add_definitions(-DORTHANC_PKCS11_ENABLED=0) +endif() + + ##################################################################### ## Autogeneration of files @@ -418,6 +431,7 @@ ${PUGIXML_SOURCES} ${SQLITE_SOURCES} ${ZLIB_SOURCES} + ${LIBP11_SOURCES} ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/md5/md5.c ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/base64/base64.cpp