changeset 4052:9fa06bddaabe framework

fix p11
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jun 2020 12:21:45 +0200
parents c459f210f6ac
children 8661d8c656e6
files OrthancFramework/Resources/CMake/LibP11Configuration.cmake
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/LibP11Configuration.cmake	Thu Jun 11 11:51:03 2020 +0200
+++ b/OrthancFramework/Resources/CMake/LibP11Configuration.cmake	Thu Jun 11 12:21:45 2020 +0200
@@ -1,4 +1,8 @@
 if (STATIC_BUILD OR NOT USE_SYSTEM_LIBP11)
+  if (NOT STATIC_BUILD AND USE_SYSTEM_OPENSSL)
+    message(FATAL_ERROR "If statically linking against libp11, one must also statically link against OpenSSL")
+  endif()
+  
   SET(LIBP11_SOURCES_DIR ${CMAKE_BINARY_DIR}/libp11-0.4.0)
   SET(LIBP11_URL "http://orthanc.osimis.io/ThirdPartyDownloads/libp11-0.4.0.tar.gz")
   SET(LIBP11_MD5 "00b3e41db5be840d822bda12f3ab2ca7")
@@ -13,7 +17,7 @@
 
   # Apply the patches
   execute_process(
-    COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Patches/libp11-0.4.0.patch
+    COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${CMAKE_CURRENT_LIST_DIR}/../Patches/libp11-0.4.0.patch
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     RESULT_VARIABLE Failure
     )
@@ -28,6 +32,8 @@
     ${LIBP11_SOURCES_DIR}/src/libp11.h
     DESTINATION ${AUTOGENERATED_DIR}/libp11)
 
+  file(WRITE ${AUTOGENERATED_DIR}/libp11/config.h "")
+
   set(LIBP11_SOURCES 
     #${LIBP11_SOURCES_DIR}/src/eng_front.c
     ${LIBP11_SOURCES_DIR}/src/eng_back.c