Generate pkgconfig file for tidy
This commit is contained in:
parent
d8839485a4
commit
4066171ea2
|
@ -3,6 +3,8 @@
|
||||||
cmake_minimum_required (VERSION 2.8.7)
|
cmake_minimum_required (VERSION 2.8.7)
|
||||||
|
|
||||||
set(LIB_NAME tidy)
|
set(LIB_NAME tidy)
|
||||||
|
set(LIBTIDY_DESCRIPTION "${LIB_NAME} - HTML syntax checker")
|
||||||
|
set(LIBTIDY_URL "http://www.html-tidy.org")
|
||||||
|
|
||||||
project (${LIB_NAME})
|
project (${LIB_NAME})
|
||||||
|
|
||||||
|
@ -371,7 +373,7 @@ else ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "${LIB_NAME}")
|
set(CPACK_PACKAGE_NAME "${LIB_NAME}")
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${LIB_NAME} - HTML syntax checker")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${LIBTIDY_DESCRIPTION}")
|
||||||
set(CPACK_PACKAGE_VENDOR "HTML Tidy Advocacy Community Group")
|
set(CPACK_PACKAGE_VENDOR "HTML Tidy Advocacy Community Group")
|
||||||
set(CPACK_PACKAGE_CONTACT "maintainer@htacg.org")
|
set(CPACK_PACKAGE_CONTACT "maintainer@htacg.org")
|
||||||
|
|
||||||
|
@ -387,7 +389,7 @@ set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/README/README.html"
|
||||||
|
|
||||||
## debian config
|
## debian config
|
||||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
|
||||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.html-tidy.org/")
|
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${LIBTIDY_URL})
|
||||||
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc")
|
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc")
|
||||||
set(CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
|
set(CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
|
||||||
set(CPACK_SOURCE_IGNORE_FILES
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
|
@ -405,4 +407,17 @@ endif ()
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
|
# pkg-config
|
||||||
|
set(INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" CACHE PATH "Installation directory for libraries")
|
||||||
|
set(INSTALL_INCDIR "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}" CACHE PATH "Installation directory for headers")
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/${LIB_NAME}.pc.cmake.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc"
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
install(FILES
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc"
|
||||||
|
DESTINATION "${INSTALL_LIBDIR}/pkgconfig"
|
||||||
|
)
|
||||||
|
|
||||||
# eof
|
# eof
|
||||||
|
|
1
build/cmake/.gitignore
vendored
1
build/cmake/.gitignore
vendored
|
@ -30,5 +30,6 @@ _CPack_Packages/*
|
||||||
tidy
|
tidy
|
||||||
libtidy*
|
libtidy*
|
||||||
tidy1.xsl
|
tidy1.xsl
|
||||||
|
tidy.pc
|
||||||
*.vcproj
|
*.vcproj
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,4 @@ libtidy.so.5.0.0
|
||||||
tidy.1
|
tidy.1
|
||||||
_CPack_Packages
|
_CPack_Packages
|
||||||
tidy1.xsl
|
tidy1.xsl
|
||||||
|
tidy.pc
|
||||||
|
|
9
tidy.pc.cmake.in
Normal file
9
tidy.pc.cmake.in
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
libdir=@INSTALL_LIBDIR@
|
||||||
|
includedir=@INSTALL_INCDIR@
|
||||||
|
|
||||||
|
Name: @LIB_NAME@
|
||||||
|
Description: @LIBTIDY_DESCRIPTION@
|
||||||
|
URL: @LIBTIDY_URL@
|
||||||
|
Version: @LIBTIDY_VERSION@
|
||||||
|
Libs: -L${libdir} -l@LIB_NAME@
|
||||||
|
Cflags: -I${includedir}
|
Loading…
Reference in a new issue