winpr: improve winpr.pc generation
This commit is contained in:
parent
fb23f08388
commit
226cad3e03
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,7 +5,7 @@ CMakeCache.txt
|
|||||||
config.h
|
config.h
|
||||||
install_manifest*.txt
|
install_manifest*.txt
|
||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
freerdp.pc
|
*.pc
|
||||||
Makefile
|
Makefile
|
||||||
Testing
|
Testing
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
|
@ -53,10 +53,23 @@ if(MONOLITHIC_BUILD)
|
|||||||
set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
|
set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
|
||||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib")
|
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})
|
target_link_libraries(${MODULE_NAME} ${WINPR_LIBS})
|
||||||
|
|
||||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT WinPRTargets)
|
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)
|
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)
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/winpr.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
|
||||||
|
@ -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}
|
|
@ -2,11 +2,12 @@ prefix=@CMAKE_INSTALL_PREFIX@
|
|||||||
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||||
includedir=@CMAKE_INSTALL_PREFIX@/include
|
includedir=@CMAKE_INSTALL_PREFIX@/include
|
||||||
|
libs=@WINPR_PC_LIBS@
|
||||||
|
|
||||||
Name: WinPR
|
Name: WinPR
|
||||||
Description: WinPR: Windows Portable Runtime
|
Description: WinPR: Windows Portable Runtime
|
||||||
URL: http://www.freerdp.com/
|
URL: http://www.freerdp.com/
|
||||||
Version: @WINPR_VERSION_FULL@
|
Version: @WINPR_VERSION_FULL@
|
||||||
Requires:
|
Requires:
|
||||||
Libs: -L${libdir} -lwinpr
|
Libs: -L${libdir} ${libs}
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
Loading…
Reference in New Issue
Block a user