From 25a5e7cbc1282211da9aff8e982045ec84612f9b Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 20 Dec 2011 12:07:39 -0500 Subject: libarchive: Build one static cmlibarchive for CMake CMake needs only a single static libarchive library and not a shared one. Call it cmlibarchive to avoid confusion. --- Utilities/cmlibarchive/libarchive/CMakeLists.txt | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Utilities/cmlibarchive/libarchive/CMakeLists.txt b/Utilities/cmlibarchive/libarchive/CMakeLists.txt index 7213ea4..7384195 100644 --- a/Utilities/cmlibarchive/libarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/libarchive/CMakeLists.txt @@ -147,24 +147,6 @@ IF(WIN32 AND NOT CYGWIN) LIST(APPEND libarchive_SOURCES filter_fork_windows.c) ENDIF(WIN32 AND NOT CYGWIN) -# Libarchive is a shared library -ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) -TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) -SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) - -# archive_static is a static library -ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) -SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - LIBARCHIVE_STATIC) -# On Posix systems, libarchive.so and libarchive.a can co-exist. -IF(NOT WIN32 OR CYGWIN) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) -ENDIF(NOT WIN32 OR CYGWIN) - -# How to install the libraries -INSTALL(TARGETS archive archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -INSTALL_MAN(${libarchive_MANS}) -INSTALL(FILES ${include_HEADERS} DESTINATION include) +# CMake needs just one static "cmlibarchive" library. +ADD_LIBRARY(cmlibarchive STATIC ${libarchive_SOURCES} ${include_HEADERS}) +TARGET_LINK_LIBRARIES(cmlibarchive ${ADDITIONAL_LIBS}) -- cgit v0.12