Skip to content

Commit 4984c65

Browse files
committed
Fix .pc location when CMAKE_INSTALL_LIBDIR not set
1 parent 6effe2e commit 4984c65

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
33

44
PROJECT(libarchive C)
55
#
6+
# Include standard installation directories
7+
include(GNUInstallDirs)
8+
#
69
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
710
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
811
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin)

libarchive/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,6 @@ IF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS)
266266
SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive)
267267
ENDIF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS)
268268

269-
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
270-
set(CMAKE_INSTALL_LIBDIR "lib")
271-
endif()
272-
273269
IF(ENABLE_INSTALL)
274270
# How to install the libraries
275271
IF(BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)