- Adapted CMake files for the PKCS#11 support
diff --git a/programs/x509/CMakeLists.txt b/programs/x509/CMakeLists.txt
index 29e5854..872feb4 100644
--- a/programs/x509/CMakeLists.txt
+++ b/programs/x509/CMakeLists.txt
@@ -1,5 +1,13 @@
+set(libs
+ polarssl
+)
+
+if(USE_PKCS11_HELPER_LIBRARY)
+ set(libs ${libs} pkcs11-helper)
+endif(USE_PKCS11_HELPER_LIBRARY)
+
add_executable(cert_app cert_app.c)
-target_link_libraries(cert_app polarssl)
+target_link_libraries(cert_app ${libs})
INSTALL(TARGETS cert_app
DESTINATION "bin"