Skip to content

Commit

Permalink
Fixes for CMake tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Feb 6, 2024
1 parent bc1415d commit 7f969e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
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

0 comments on commit 7f969e4

Please sign in to comment.