add libzip to the build

develop
Myk Taylor 2020-08-08 20:04:46 -07:00
parent eeeb638c1c
commit 28eaf0ae8b
2 changed files with 17 additions and 3 deletions

@ -425,11 +425,16 @@ if(BUILD_LIBRARY)
IMPORTED_LOCATION ${XLSXIO_INSTALL_DIR}/lib/libxlsxio_read.a) IMPORTED_LOCATION ${XLSXIO_INSTALL_DIR}/lib/libxlsxio_read.a)
add_dependencies(xlsxio_read xlsxio_project) add_dependencies(xlsxio_read xlsxio_project)
ExternalProject_Get_Property(libzip_project INSTALL_DIR)
set(LIBZIP_INSTALL_DIR ${INSTALL_DIR})
include_directories(${LIBZIP_INSTALL_DIR}/include)
add_library(zip STATIC IMPORTED)
set_target_properties(zip PROPERTIES
IMPORTED_LOCATION ${LIBZIP_INSTALL_DIR}/lib64/libzip.a)
add_dependencies(zip libzip_project)
# just pull from the system until I figure out how to integrate these deps # just pull from the system until I figure out how to integrate these deps
# into the build # into the build
add_library(zip SHARED IMPORTED)
set_target_properties(zip PROPERTIES
IMPORTED_LOCATION /usr/lib64/libzip.so)
add_library(expat SHARED IMPORTED) add_library(expat SHARED IMPORTED)
set_target_properties(expat PROPERTIES set_target_properties(expat PROPERTIES
IMPORTED_LOCATION /usr/lib64/libexpat.so) IMPORTED_LOCATION /usr/lib64/libexpat.so)

@ -18,6 +18,15 @@ option(CLSOCKET_DEP_ONLY "Build for use inside other CMake projects as dependenc
add_subdirectory(clsocket) add_subdirectory(clsocket)
ide_folder(clsocket "Depends") ide_folder(clsocket "Depends")
set(LIBZIP_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/libzip)
ExternalProject_Add(libzip_project
PREFIX libzip
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libzip
INSTALL_DIR ${LIBZIP_INSTALL_DIR}
BUILD_BYPRODUCTS ${LIBZIP_INSTALL_DIR}/lib64/libzip.a
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBZIP_INSTALL_DIR} -DCMAKE_BUILD_TYPE=Release -DBUILD_DOC=OFF -DBUILD_EXAMPLES=OFF -DBUILD_REGRESS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TOOLS=OFF -DENABLE_BZIP2=OFF -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_LZMA=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
set(XLSXIO_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/xlsxio) set(XLSXIO_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/xlsxio)
ExternalProject_Add(xlsxio_project ExternalProject_Add(xlsxio_project
PREFIX xlsxio PREFIX xlsxio