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 7334d7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,17 @@ jobs:
sudo apt-get update
sudo apt-get install -y cmake
#pull and build wolfssl
- uses: actions/checkout@master
#pull wolfssl
- name: Checkout wolfssl
uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
path: wolfssl
- name: Build wolfssl
working-directory: ./wolfssl
run: |
mkdir build
cd build
cmake -DWOLFSSL_TPM=yes ..
make
sudo make install

#build wolftpm
- name: Build wolfTPM
run: |
mkdir build
cd build
cmake -DWOLFTPM_INTERFACE=SWTPM ..
make
cmake -DWOLFTPM_INTERFACE=SWTPM -DWITH_WOLFSSL_TREE="$GITHUB_WORKSPACE/wolfssl" ..
cmake --build .
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 7334d7d

Please sign in to comment.