Skip to content

Commit

Permalink
Don't build internal OpenPGP parser when not using it
Browse files Browse the repository at this point in the history
This regressed in d2be477 which tried
to shove the whole thing into the subdirectory for sawing off, but
it doesn't quite work like that - you can't quite depend on an option
that gets defined only if the option is defined...
  • Loading branch information
pmatilai committed Dec 1, 2023
1 parent bccf58f commit 40cb6ba
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ option(WITH_AUDIT "Build with audit support" ON)
option(WITH_FSVERITY "Build with fsverity support" OFF)
option(WITH_IMAEVM "Build with IMA support" OFF)
option(WITH_FAPOLICYD "Build with fapolicyd support" ON)
option(WITH_INTERNAL_OPENPGP "Use internal OpenPGP parser (DEPRECATED)" OFF)

set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home")
set(RPM_MACROSDIR "${RPM_CONFIGDIR}/macros.d")
Expand Down
3 changes: 1 addition & 2 deletions rpmio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ target_sources(librpmio PRIVATE
target_compile_definitions(librpmio PRIVATE RPM_CONFIGDIR="${RPM_CONFIGDIR}")
target_include_directories(librpmio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(rpmpgp_legacy)

if (WITH_INTERNAL_OPENPGP)
add_subdirectory(rpmpgp_legacy)
target_link_libraries(librpmio PRIVATE rpmpgp_legacy)
else()
pkg_check_modules(RPMSEQUOIA REQUIRED IMPORTED_TARGET rpm-sequoia>=1.4.0)
Expand Down
1 change: 0 additions & 1 deletion rpmio/rpmpgp_legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# it can only be built as a part of rpm build tree.
add_library(rpmpgp_legacy OBJECT)

option(WITH_INTERNAL_OPENPGP "Use internal OpenPGP parser (DEPRECATED)" OFF)
option(WITH_OPENSSL "Use openssl (instead of libgcrypt) for internal crypto" OFF)

target_sources(rpmpgp_legacy PRIVATE
Expand Down

0 comments on commit 40cb6ba

Please sign in to comment.