2023-09-12 17:16:13 +02:00
|
|
|
cmake_minimum_required(VERSION 3.9)
|
|
|
|
project(test VERSION 1.0.1 DESCRIPTION "test lib")
|
|
|
|
include(GNUInstallDirs)
|
2023-09-12 18:21:59 +02:00
|
|
|
add_library(test STATIC test.c)
|
2023-09-12 17:16:13 +02:00
|
|
|
set_target_properties(test PROPERTIES
|
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
SOVERSION 1
|
|
|
|
PUBLIC_HEADER test.h)
|
|
|
|
# configure_file(test.pc.in test.pc @ONLY)
|
|
|
|
target_include_directories(test PRIVATE .)
|
|
|
|
install(TARGETS test
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/test.pc
|
|
|
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|