| 1 |
project(p11test) |
| 2 |
|
| 3 |
set(INCLUDE_DIRS ${PROJECT_SOURCE_DIR} |
| 4 |
${PROJECT_SOURCE_DIR}/.. |
| 5 |
${PROJECT_SOURCE_DIR}/../common |
| 6 |
${PROJECT_SOURCE_DIR}/../pkcs11 |
| 7 |
${CPPUNIT_INCLUDES} |
| 8 |
) |
| 9 |
|
| 10 |
set(SOURCES p11test.cpp |
| 11 |
SymmetricAlgorithmTests.cpp |
| 12 |
DigestTests.cpp |
| 13 |
InitTests.cpp |
| 14 |
InfoTests.cpp |
| 15 |
RandomTests.cpp |
| 16 |
SessionTests.cpp |
| 17 |
TokenTests.cpp |
| 18 |
UserTests.cpp |
| 19 |
ObjectTests.cpp |
| 20 |
DeriveTests.cpp |
| 21 |
SignVerifyTests.cpp |
| 22 |
AsymEncryptDecryptTests.cpp |
| 23 |
AsymWrapUnwrapTests.cpp |
| 24 |
TestsBase.cpp |
| 25 |
TestsNoPINInitBase.cpp |
| 26 |
ForkTests.cpp |
| 27 |
../common/log.cpp |
| 28 |
../common/osmutex.cpp |
| 29 |
) |
| 30 |
|
| 31 |
include_directories(${INCLUDE_DIRS}) |
| 32 |
|
| 33 |
add_executable(${PROJECT_NAME} ${SOURCES}) |
| 34 |
target_link_libraries(${PROJECT_NAME} softhsm2-static ${CRYPTO_LIBS} ${CPPUNIT_LIBS} ${SQLITE3_LIBS}) |
| 35 |
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS -pthread) |
| 36 |
|
| 37 |
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME} |
| 38 |
WORKING_DIRECTORY ${PROJECT_BINARY_DIR} |
| 39 |
) |
| 40 |
|
| 41 |
set(builddir ${PROJECT_BINARY_DIR}) |
| 42 |
configure_file(softhsm2.conf.in softhsm2.conf) |
| 43 |
configure_file(softhsm2-alt.conf.in softhsm2-alt.conf) |
| 44 |
configure_file(softhsm2-reset-on-fork.conf.in softhsm2-reset-on-fork.conf) |
| 45 |
configure_file(softhsm2-mech.conf.in softhsm2-mech.conf) |
| 46 |
configure_file(tokens/dummy.in tokens/dummy) |