summaryrefslogtreecommitdiff
path: root/libarchive/CMakeLists.txt
diff options
context:
space:
mode:
authorXiao-Long Chen <chenxiaolong@cxl.epac.to>2015-01-23 15:12:11 -0500
committerXiao-Long Chen <chenxiaolong@cxl.epac.to>2015-01-23 15:16:57 -0500
commit16832582b30a33ea5ed6add40988273347172b49 (patch)
tree861071be69dabe4ecdd4d3ad317cda6d27708102 /libarchive/CMakeLists.txt
parentcf053b6b1825eb77f6271a7724e492cec01785b9 (diff)
downloadlibarchive-16832582b30a33ea5ed6add40988273347172b49.tar.gz
Allow library installation to be disabled in CMake
Diffstat (limited to 'libarchive/CMakeLists.txt')
-rw-r--r--libarchive/CMakeLists.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt
index 140e75b2..db847c10 100644
--- a/libarchive/CMakeLists.txt
+++ b/libarchive/CMakeLists.txt
@@ -203,12 +203,14 @@ 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)
+IF(ENABLE_INSTALL)
+ # 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)
+ENDIF()
add_subdirectory(test)