File: CMakeLists.txt

package info (click to toggle)
rpm 6.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,580 kB
  • sloc: cpp: 53,319; ansic: 13,888; sh: 2,038; python: 1,175; makefile: 35; xml: 26
file content (35 lines) | stat: -rw-r--r-- 1,068 bytes parent folder | download
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
34
35
Python3_add_library(_rpm
	rpmmodule.c rpmsystem-py.h
	header-py.c header-py.h
	rpmarchive-py.c rpmarchive-py.h
	rpmds-py.c rpmds-py.h
	rpmfd-py.c rpmfd-py.h
	rpmfiles-py.c rpmfiles-py.h
	rpmkeyring-py.c rpmkeyring-py.h
	rpmmi-py.c rpmmi-py.h
	rpmii-py.c rpmii-py.h
	rpmps-py.c rpmps-py.h
	rpmmacro-py.c rpmmacro-py.h
	rpmstrpool-py.c rpmstrpool-py.h
	rpmtd-py.c rpmtd-py.h
	rpmte-py.c rpmte-py.h
	rpmts-py.c rpmts-py.h
	rpmver-py.c rpmver-py.h
	spec-py.c spec-py.h
)

# Select Python stable ABI
target_compile_definitions(_rpm PRIVATE Py_LIMITED_API=0x030A0000)

target_link_libraries(_rpm PRIVATE librpmio librpm librpmbuild librpmsign)

install(TARGETS _rpm
	DESTINATION ${Python3_SITEARCH}/rpm)
install(FILES rpm/transaction.py rpm/__init__.py
	DESTINATION ${Python3_SITEARCH}/rpm)
install(DIRECTORY examples TYPE DOC)

set(egginfo ${PROJECT_NAME}-${PROJECT_VERSION}-py${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.egg-info)
configure_file(rpm.egg-info.in ${egginfo} @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${egginfo}
	DESTINATION ${Python3_SITEARCH})