summaryrefslogtreecommitdiffstats
path: root/test/interactive-helper/CMakeLists.txt
blob: 8e8764353ffb702af150dc20a833bcbc5e835117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
if(USE_SYSTEM_APTPKG)
   find_library(aptpkg NAMES apt-pkg NO_PACKAGE_ROOT_PATH REQUIRED)
   set(APTPKG_LIB "${aptpkg}")
   # it isn't easy to link against -private, but that is by design
   set(APTPRIVATE_LIB "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/libapt-private.so.0.0")
   set(APTPRIVATE_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}")
else()
   set(APTPKG_LIB "apt-pkg")
   set(APTPRIVATE_LIB "apt-private")
   set(APTPRIVATE_INCLUDE_DIRS "")
endif()

add_executable(mthdcat mthdcat.cc)
target_link_libraries(mthdcat ${APTPKG_LIB})
add_executable(testdeb testdeb.cc)
target_link_libraries(testdeb ${APTPKG_LIB})
add_executable(extract-control extract-control.cc)
target_link_libraries(extract-control ${APTPKG_LIB})
add_executable(aptwebserver aptwebserver.cc)
target_link_libraries(aptwebserver ${APTPKG_LIB} ${CMAKE_THREAD_LIBS_INIT})
add_executable(aptdropprivs aptdropprivs.cc)
target_link_libraries(aptdropprivs ${APTPKG_LIB})
add_executable(test_fileutl test_fileutl.cc)
target_link_libraries(test_fileutl ${APTPKG_LIB})
add_executable(createdeb-cve-2020-27350 createdeb-cve-2020-27350.cc)
add_executable(longest-dependency-chain longest-dependency-chain.cc)
target_link_libraries(longest-dependency-chain ${APTPKG_LIB} ${APTPRIVATE_LIB})
target_include_directories(longest-dependency-chain PRIVATE ${APTPRIVATE_INCLUDE_DIRS})

add_library(noprofile SHARED libnoprofile.c)
target_link_libraries(noprofile ${CMAKE_DL_LIBS})