Fixes for CMake tests.

pull/329/head
David Garske 2024-02-05 17:12:58 -08:00
parent bc1415d0da
commit 7f969e47da
2 changed files with 14 additions and 10 deletions

View File

@ -22,7 +22,8 @@ jobs:
sudo apt-get install -y cmake
#pull and build wolfssl
- uses: actions/checkout@master
- name: Checkout wolfssl
uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
path: wolfssl
@ -31,14 +32,16 @@ jobs:
run: |
mkdir build
cd build
cmake -DWOLFSSL_TPM=yes ..
make
sudo make install
# wolfSSL PR 7188 broke "make install" unless WOLFSSL_INSTALL is set
cmake -DWOLFSSL_TPM=yes -DWOLFSSL_INSTALL=yes -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" ..
cmake --build .
cmake --install .
#build wolftpm
- name: Build wolfTPM
run: |
mkdir build
cd build
cmake -DWOLFTPM_INTERFACE=SWTPM ..
make
cmake -DWOLFTPM_INTERFACE=SWTPM -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install" -DWITH_WOLFSSL="$GITHUB_WORKSPACE/install" ..
cmake --build .
cmake --install .

View File

@ -1,6 +1,6 @@
# CMakeList.txt
#
# Copyright (C) 2006-2022 wolfSSL Inc.
# Copyright (C) 2006-2024 wolfSSL Inc.
#
# This file is part of wolfSSL. (formerly known as CyaSSL)
#
@ -132,7 +132,7 @@ if (WITH_WOLFSSL)
target_link_libraries(wolftpm PUBLIC wolfssl)
target_include_directories(wolftpm PUBLIC ${WITH_WOLFSSL}/include)
target_link_directories(wolftpm PUBLIC ${WITH_WOLFSSL}/lib)
elseif (WITH_WOLFSSL_TREE)
elseif (WITH_WOLFSSL_TREE)
set(WOLFSSL_TPM "yes" CACHE STRING "")
set(WOLFSSL_EXAMPLES "no" CACHE STRING "")
set(WOLFSSL_CRYPT_TESTS "no" CACHE STRING "")
@ -221,7 +221,7 @@ file(REMOVE ${OPTION_FILE})
file(APPEND ${OPTION_FILE} "/* wolftpm options.h\n")
file(APPEND ${OPTION_FILE} " * generated from cmake configure options\n")
file(APPEND ${OPTION_FILE} " *\n")
file(APPEND ${OPTION_FILE} " * Copyright (C) 2006-2022 wolfSSL Inc.\n")
file(APPEND ${OPTION_FILE} " * Copyright (C) 2006-2024 wolfSSL Inc.\n")
file(APPEND ${OPTION_FILE} " *\n")
file(APPEND ${OPTION_FILE} " * This file is part of wolfSSL.\n")
file(APPEND ${OPTION_FILE} " *\n")
@ -292,7 +292,8 @@ install(TARGETS wolftpm
# Install the export set
install(EXPORT wolftpm-targets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wolftpm
FILE wolftpm-config.cmake)
FILE wolftpm-config.cmake
NAMESPACE wolfssl::)
# Install the headers
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/wolftpm/