Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for CMake tests #329

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 .
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
#
Expand Down Expand Up @@ -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 "")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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/
Expand Down
Loading