Skip to content

Commit

Permalink
cmake: Add liboqs to fizz-config
Browse files Browse the repository at this point in the history
Summary:
The Fizz::Fizz cmake target public interface changes depending whether or not
liboqs was found during the configure stage. If liboqs was found during configuration, then
it is included as a dependency to Fizz. Consequently, we need to ensure that
the generated fizz-config.cmake file that our downstream consumers use also
find this dependency.

Reviewed By: abakiaydin

Differential Revision: D58302705

fbshipit-source-id: 5ad42ea7a9536675c3a0866fd56091dc66f18e33
  • Loading branch information
Mingtao Yang authored and facebook-github-bot committed Jun 7, 2024
1 parent e2b117f commit a4f4175
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fizz/cmake/fizz-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,22 @@
set_and_check(FIZZ_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(FIZZ_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@")

set(FIZZ_HAVE_OQS "@FIZZ_HAVE_OQS@")

if (NOT TARGET fizz::fizz)
include("${FIZZ_CMAKE_DIR}/fizz-targets.cmake")
endif()

set(FIZZ_LIBRARIES fizz::fizz)

include(CMakeFindDependencyMacro)

find_dependency(Sodium)
find_dependency(folly CONFIG)
find_dependency(ZLIB)
if(FIZZ_HAVE_OQS)
find_dependency(liboqs CONFIG)
endif()

if (NOT fizz_FIND_QUIETLY)
message(STATUS "Found fizz: ${PACKAGE_PREFIX_DIR}")
Expand Down

0 comments on commit a4f4175

Please sign in to comment.