aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindLibarchive.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindLibarchive.cmake')
-rw-r--r--cmake/FindLibarchive.cmake14
1 files changed, 9 insertions, 5 deletions
diff --git a/cmake/FindLibarchive.cmake b/cmake/FindLibarchive.cmake
index bba3a35..37ac6bb 100644
--- a/cmake/FindLibarchive.cmake
+++ b/cmake/FindLibarchive.cmake
@@ -16,18 +16,19 @@ endif()
find_path(LIBARCHIVE_INC
NAMES archive.h archive_entry.h
HINTS
- ENV libarcguvePath${_lib_suffix}
- ENV libarcguvePath
- ${_JSONC_INCLUDE_DIRS}
+ ENV libarchivePath${_lib_suffix}
+ ENV libarchivePath
+ ${_LIBARCHIVE_INCLUDE_DIRS}
PATHS
/usr/include /usr/local/include)
find_library(LIBARCHIVE_LIB
NAMES ${_LIBARCHIVE_LIBRARIES} archive
HINTS
- ENV libarcguvePath${_lib_suffix}
- ENV libarcguvePath
+ ENV libarchivePath${_lib_suffix}
+ ENV libarchivePath
${_LIBARCHIVE_LIBRARY_DIRS}
+ ${_LIBARCHIVE_STATIC_LIBRARY_DIRS}
PATHS
/usr/lib /usr/local/lib)
@@ -38,4 +39,7 @@ mark_as_advanced(LIBARCHIVE_INC LIBARCHIVE_LIB)
if(LIBARCHIVE_FOUND)
set(LIBARCHIVE_INCLUDE_DIRS ${LIBARCHIVE_INC})
set(LIBARCHIVE_LIBRARIES ${LIBARCHIVE_LIB})
+ if (BUILD_STATIC)
+ set(LIBARCHIVE_LIBRARIES ${LIBARCHIVE_LIBRARIES} ${_LIBARCHIVE_STATIC_LIBRARIES})
+ endif()
endif() \ No newline at end of file