Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
7d45db99
Commit
7d45db99
authored
Oct 10, 2016
by
Daniel Pfeifer
Browse files
Don't require liblzma when using system libarchive
parent
a28b8f95
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7d45db99
...
...
@@ -383,19 +383,21 @@ macro (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Build or use system liblzma for libarchive.
if
(
CMAKE_USE_SYSTEM_LIBLZMA
)
find_package
(
LibLZMA
)
if
(
NOT LIBLZMA_FOUND
)
message
(
FATAL_ERROR
"CMAKE_USE_SYSTEM_LIBLZMA is ON but LibLZMA is not found!"
)
if
(
NOT CMAKE_USE_SYSTEM_LIBARCHIVE
)
if
(
CMAKE_USE_SYSTEM_LIBLZMA
)
find_package
(
LibLZMA
)
if
(
NOT LIBLZMA_FOUND
)
message
(
FATAL_ERROR
"CMAKE_USE_SYSTEM_LIBLZMA is ON but LibLZMA is not found!"
)
endif
()
set
(
LZMA_INCLUDE_DIR
${
LIBLZMA_INCLUDE_DIRS
}
)
set
(
LZMA_LIBRARY
${
LIBLZMA_LIBRARIES
}
)
else
()
add_subdirectory
(
Utilities/cmliblzma
)
CMAKE_SET_TARGET_FOLDER
(
cmliblzma
"Utilities/3rdParty"
)
set
(
LZMA_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Utilities/cmliblzma/liblzma/api"
)
set
(
LZMA_LIBRARY cmliblzma
)
endif
()
set
(
LZMA_INCLUDE_DIR
${
LIBLZMA_INCLUDE_DIRS
}
)
set
(
LZMA_LIBRARY
${
LIBLZMA_LIBRARIES
}
)
else
()
add_subdirectory
(
Utilities/cmliblzma
)
CMAKE_SET_TARGET_FOLDER
(
cmliblzma
"Utilities/3rdParty"
)
set
(
LZMA_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Utilities/cmliblzma/liblzma/api"
)
set
(
LZMA_LIBRARY cmliblzma
)
endif
()
#---------------------------------------------------------------------
...
...
Brad King
@brad.king
Mentioned in commit
9c7fc00a
·
Oct 10, 2016
Mentioned in commit
9c7fc00a
Mentioned in commit 9c7fc00a45b6f0891c95fba707b0e2ce9d2e2dbf
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment