File: CMakeLists.txt

package info (click to toggle)
apt 3.1.13
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 22,764 kB
  • sloc: cpp: 71,085; sh: 31,750; xml: 5,553; perl: 217; python: 197; ansic: 191; makefile: 41
file content (33 lines) | stat: -rw-r--r-- 1,507 bytes parent folder | download | duplicates (3)
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
32
33
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(testkeep testkeep.cc)
target_link_libraries(testkeep ${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})