winpr: improve winpr.pc generation

This commit is contained in:
Marc-André Moreau 2013-11-10 17:54:41 -05:00
parent fb23f08388
commit 226cad3e03
4 changed files with 16 additions and 14 deletions

2
.gitignore vendored
View File

@ -5,7 +5,7 @@ CMakeCache.txt
config.h
install_manifest*.txt
CTestTestfile.cmake
freerdp.pc
*.pc
Makefile
Testing
cmake_install.cmake

View File

@ -53,10 +53,23 @@ if(MONOLITHIC_BUILD)
set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib")
list(REMOVE_DUPLICATES WINPR_LIBS)
target_link_libraries(${MODULE_NAME} ${WINPR_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT WinPRTargets)
set(WINPR_PC_LIBS "-lwinpr")
foreach(WINPR_LIB ${WINPR_LIBS})
if(${WINPR_LIB} MATCHES "^-l.*")
set(WINPR_PC_LIBS "${WINPR_PC_LIBS} ${WINPR_LIB}")
elseif(${WINPR_LIB} MATCHES "^/.*")
else()
set(WINPR_PC_LIBS "${WINPR_PC_LIBS} -l${WINPR_LIB}")
endif()
endforeach()
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)

View File

@ -1,12 +0,0 @@
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

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