Passthrough generator flags
This commit is contained in:
5
3rdParty/libarchive/CMakeLists.txt
vendored
5
3rdParty/libarchive/CMakeLists.txt
vendored
@@ -8,20 +8,19 @@ if (NOT DEFINED LibArchive_LIBRARIES)
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/deps
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR}/deps
|
||||
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR}/deps --config Release
|
||||
RESULT_VARIABLE build_result
|
||||
)
|
||||
if (NOT ${build_result} EQUAL "0")
|
||||
message(FATAL_ERROR "Failed to build lib archive!")
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/deps/INSTALL)
|
||||
else ()
|
||||
message("Using system LibArchive")
|
||||
set(USING_SYSTEM_LIBARCHIVE ON PARENT_SCOPE)
|
||||
endif ()
|
||||
|
||||
function(LinkLibArchive TARGET)
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/deps/INSTALL)
|
||||
find_package(LibArchive REQUIRED)
|
||||
set(ZLIB_USE_STATIC_LIBS ON)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
Reference in New Issue
Block a user