<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 5:59 PM, Rafaël Carré <span dir="ltr"><<a href="mailto:funman@videolan.org" target="_blank">funman@videolan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Steve,<br>
<br>
Le 23/10/2013 00:20, Steve Borho a écrit :<br>
<div class="im">> # HG changeset patch<br>
> # User Steve Borho <<a href="mailto:steve@borho.org">steve@borho.org</a>><br>
> # Date 1382480398 18000<br>
> # Tue Oct 22 17:19:58 2013 -0500<br>
> # Node ID f51a70b352878bb64c71cbcdc40898a9706db2cf<br>
> # Parent 6d96d64c4e9a2c526b57274760a7147241328cb3<br>
> cmake: generate and install pkgconfig file<br>
><br>
> Feedback appreciated; what is this missing?<br>
><br>
> diff -r 6d96d64c4e9a -r f51a70b35287 source/CMakeLists.txt<br>
> --- a/source/CMakeLists.txt Tue Oct 22 23:36:36 2013 +0530<br>
> +++ b/source/CMakeLists.txt Tue Oct 22 17:19:58 2013 -0500<br>
> @@ -189,6 +189,13 @@<br>
> ARCHIVE DESTINATION lib)<br>
> install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)<br>
><br>
> +if(UNIX AND NOT APPLE)<br>
<br>
</div>Hm this should always be installed, think about cross compilation.<br>
<br>
In VLC we use pkg-config on both OSX and when cross compiling our<br>
Windows binaries (with custom install prefixes in both cases).<br>
<br>
Is it possible to disable installation only when targetting MSVC ?<br></blockquote><div><br></div><div>dead easy; but would it be better if I checked for whether pkgconfig was available?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
> + # Produce a pkg-config file for linking against the shared lib<br>
> + configure_file("<a href="http://x265.pc.in" target="_blank">x265.pc.in</a>" "x265.pc" @ONLY)<br>
> + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/x265.pc"<br>
> + DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}/pkgconfig")<br>
<br>
</div>PROJECT_LIBRARY_INSTALL_DIR is not defined for me, I replaced it with<br>
${CMAKE_INSTALL_PREFIX}/lib locally.<br></blockquote><div><br></div><div>ok</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
> +endif()<br>
> +<br>
> if(NOT WIN32)<br>
> configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/<a href="http://cmake_uninstall.cmake.in" target="_blank">cmake_uninstall.cmake.in</a>"<br>
> "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"<br>
> diff -r 6d96d64c4e9a -r f51a70b35287 source/<a href="http://x265.pc.in" target="_blank">x265.pc.in</a><br>
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
> +++ b/source/<a href="http://x265.pc.in" target="_blank">x265.pc.in</a> Tue Oct 22 17:19:58 2013 -0500<br>
> @@ -0,0 +1,10 @@<br>
> +prefix=@CMAKE_INSTALL_PREFIX@<br>
> +exec_prefix=${prefix}<br>
> +libdir=${exec_prefix}/lib<br>
> +includedir=${prefix}/include<br>
> +<br>
> +Name: @CMAKE_PROJECT_NAME@<br>
> +Description: H.265/HEVC video encoder<br>
> +Version: @X265_LATEST_TAG@<br>
> +Libs: -L${libdir} -lx265<br>
<br>
</div>For static linking to work, this also needs:<br>
<br>
Libs.private: -lstdc++ -lm -lpthread<br></blockquote><div><br></div><div>Does this work?<br></div><div><br></div><div>Libs.private: @<span style="color:rgb(0,0,0)">CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@ </span>@PLATFORM_LIBS@</div>
<div><br></div><div>--</div><div>Steve</div></div></div></div>