freerdp: improve pkgconfig .pc file generation

This commit is contained in:
Marc-André Moreau 2013-11-09 17:51:09 -05:00
parent 70aed3fa85
commit 0e662a060e
6 changed files with 34 additions and 9 deletions

View File

@ -508,12 +508,6 @@ include_directories("${CMAKE_BINARY_DIR}/winpr/include")
add_subdirectory(winpr)
# Generate pkg-config
if(NOT MSVC)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
if(WITH_CUNIT)
message(FATAL_ERROR "cunit (WITH_CUNIT) is deprecated please use BUILD_TESTING to build ctest tests.
The cunit directory contains the old tests and is kept until all tests are converted.")

View File

@ -65,3 +65,7 @@ if(MONOLITHIC_BUILD)
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")
endif()
set(FREERDP_PC_LIBS "-lfreerdp -lwinpr")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

View File

@ -2,12 +2,12 @@ prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
libs=@FREERDP_PC_LIBS@
Name: FreeRDP
Description: A free remote desktop protocol client
Description: FreeRDP: A Remote Desktop Protocol Implementation
URL: http://www.freerdp.com/
Version: @FREERDP_VERSION_FULL@
Requires:
Libs: -L${libdir} -lfreerdp-cache -lfreerdp-codec -lfreerdp-core -lfreerdp-crypto -lfreerdp-gdi -lfreerdp-locale -lfreerdp-rail -lfreerdp-utils -lwinpr-sspi -lwinpr-rpc -lwinpr-utils
Libs: -L${libdir} ${libs}
Cflags: -I${includedir}

View File

@ -57,5 +57,8 @@ if(MONOLITHIC_BUILD)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT WinPRTargets)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr.pc.in ${CMAKE_CURRENT_BINARY_DIR}/winpr.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/winpr.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/libwinpr")
endif()

12
winpr/libwinpr/winpr.pc Normal file
View File

@ -0,0 +1,12 @@
prefix=/opt/freerds
exec_prefix=/opt/freerds
libdir=/opt/freerds/lib64
includedir=/opt/freerds/include
Name: WinPR
Description: WinPR: Windows Portable Runtime
URL: http://www.freerdp.com/
Version: 1.1.0
Requires:
Libs: -L${libdir} -lwinpr
Cflags: -I${includedir}

View File

@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
Name: WinPR
Description: WinPR: Windows Portable Runtime
URL: http://www.freerdp.com/
Version: @WINPR_VERSION_FULL@
Requires:
Libs: -L${libdir} -lwinpr
Cflags: -I${includedir}