Генерация файла для pkg-config вынесена в отдельную функцию
This commit is contained in:
parent
197e5b3939
commit
c73c31b380
@ -31,6 +31,7 @@ include(CMLibCotire)
|
||||
include(CMLibBuildTypes)
|
||||
include(CMLibCommonTargetProperties)
|
||||
include(CMLibCommonLibraryTarget)
|
||||
include(CMLibPkgConfig)
|
||||
include(CMLibCodeAnalysisPvsStudio)
|
||||
include(CMLibCodeAnalysisClangAnalyze)
|
||||
include(CMLibCodeAnalysisClangTidy)
|
||||
|
@ -35,7 +35,4 @@ function(add_common_library target)
|
||||
install(TARGETS ${target}_static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
# cmake-format: on
|
||||
|
||||
configure_file(${CMLIB_MODULE_DIR}/pc/lib.pc.in ${CMAKE_BINARY_DIR}/${target}.pc)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${target}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endfunction()
|
||||
|
4
CMLibPkgConfig.cmake
Normal file
4
CMLibPkgConfig.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
function(generate_pkgconfig library_name)
|
||||
configure_file(${CMLIB_MODULE_DIR}/pc/lib.pc.in ${CMAKE_BINARY_DIR}/${library_name}.pc)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${library_name}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endfunction()
|
@ -3,11 +3,11 @@ exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: @current_target@
|
||||
Description: @current_target@ library
|
||||
Name: @library_name@
|
||||
Description: @library_name@ library
|
||||
Version: @PROJECT_VERSION@
|
||||
|
||||
Requires:
|
||||
Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -l@current_target@
|
||||
Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -l@library_name@
|
||||
Cflags: -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user