]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Create libarchive.pc inside the cmake build dir 1362/head
authorDavid Capello <davidcapello@gmail.com>
Wed, 14 Jun 2017 23:19:20 +0000 (20:19 -0300)
committerDavid Capello <davidcapello@gmail.com>
Fri, 17 Apr 2020 13:08:54 +0000 (10:08 -0300)
In case that we don't have write access in the source dir, we have to
write generated files in the build dir.

build/cmake/CreatePkgConfigFile.cmake

index fc8529a571f2833310199d6f8cbb0a48022c04b7..bc5a43f72af17a24b9dee174de16f87a7c604396 100644 (file)
@@ -24,10 +24,10 @@ ENDFOREACH()
 #       thus there's a good chance it'll make some binutils versions unhappy...
 #       This only affects Libs.private (looked up for static builds) though.
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc.in
-               ${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc
+               ${CMAKE_CURRENT_BINARY_DIR}/build/pkgconfig/libarchive.pc
                @ONLY)
 # And install it, of course ;).
 IF(ENABLE_INSTALL)
-  INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/pkgconfig/libarchive.pc
           DESTINATION "lib/pkgconfig")
 ENDIF()