use correct lib dir on 32-bit

develop
Myk Taylor 2020-08-08 20:42:03 -07:00
parent 8a05f09cd6
commit 8753f9feaf
2 changed files with 17 additions and 8 deletions

@ -419,26 +419,29 @@ endif()
if(BUILD_LIBRARY) if(BUILD_LIBRARY)
ExternalProject_Get_Property(xlsxio_project INSTALL_DIR) ExternalProject_Get_Property(xlsxio_project INSTALL_DIR)
set(XLSXIO_INSTALL_DIR ${INSTALL_DIR}) set(XLSXIO_INSTALL_DIR ${INSTALL_DIR})
ExternalProject_Get_Property(xlsxio_project BUILD_BYPRODUCTS)
set(XLSXIO_LIB ${BUILD_BYPRODUCTS})
include_directories(${XLSXIO_INSTALL_DIR}/include) include_directories(${XLSXIO_INSTALL_DIR}/include)
add_library(xlsxio_read STATIC IMPORTED) add_library(xlsxio_read STATIC IMPORTED)
set_target_properties(xlsxio_read PROPERTIES set_target_properties(xlsxio_read PROPERTIES IMPORTED_LOCATION ${XLSXIO_LIB})
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) ExternalProject_Get_Property(libzip_project INSTALL_DIR)
set(LIBZIP_INSTALL_DIR ${INSTALL_DIR}) set(LIBZIP_INSTALL_DIR ${INSTALL_DIR})
ExternalProject_Get_Property(libzip_project BUILD_BYPRODUCTS)
set(LIBZIP_LIB ${BUILD_BYPRODUCTS})
include_directories(${LIBZIP_INSTALL_DIR}/include) include_directories(${LIBZIP_INSTALL_DIR}/include)
add_library(zip STATIC IMPORTED) add_library(zip STATIC IMPORTED)
set_target_properties(zip PROPERTIES set_target_properties(zip PROPERTIES IMPORTED_LOCATION ${LIBZIP_LIB})
IMPORTED_LOCATION ${LIBZIP_INSTALL_DIR}/lib64/libzip.a)
add_dependencies(zip libzip_project) add_dependencies(zip libzip_project)
ExternalProject_Get_Property(libexpat_project INSTALL_DIR) ExternalProject_Get_Property(libexpat_project INSTALL_DIR)
set(LIBEXPAT_INSTALL_DIR ${INSTALL_DIR}) set(LIBEXPAT_INSTALL_DIR ${INSTALL_DIR})
ExternalProject_Get_Property(libexpat_project BUILD_BYPRODUCTS)
set(LIBEXPAT_LIB ${BUILD_BYPRODUCTS})
include_directories(${LIBEXPAT_INSTALL_DIR}/include) include_directories(${LIBEXPAT_INSTALL_DIR}/include)
add_library(expat STATIC IMPORTED) add_library(expat STATIC IMPORTED)
set_target_properties(expat PROPERTIES set_target_properties(expat PROPERTIES IMPORTED_LOCATION ${LIBEXPAT_LIB})
IMPORTED_LOCATION ${LIBEXPAT_INSTALL_DIR}/lib64/libexpat.a)
add_dependencies(expat libexpat_project) add_dependencies(expat libexpat_project)
add_subdirectory(library) add_subdirectory(library)

@ -18,12 +18,18 @@ 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")
if("${DFHACK_BUILD_ARCH}" STREQUAL "64")
set(OUTPUT_LIB_DIR "lib64")
else()
set(OUTPUT_LIB_DIR "lib")
endif()
set(LIBEXPAT_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/libexpat) set(LIBEXPAT_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/libexpat)
ExternalProject_Add(libexpat_project ExternalProject_Add(libexpat_project
PREFIX libexpat PREFIX libexpat
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libexpat/expat SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libexpat/expat
INSTALL_DIR ${LIBEXPAT_INSTALL_DIR} INSTALL_DIR ${LIBEXPAT_INSTALL_DIR}
BUILD_BYPRODUCTS ${LIBEXPAT_INSTALL_DIR}/lib64/libexpat.a BUILD_BYPRODUCTS ${LIBEXPAT_INSTALL_DIR}/${OUTPUT_LIB_DIR}/libexpat.a
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBEXPAT_INSTALL_DIR} -DCMAKE_BUILD_TYPE=Release -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBEXPAT_INSTALL_DIR} -DCMAKE_BUILD_TYPE=Release -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
) )
@ -32,7 +38,7 @@ ExternalProject_Add(libzip_project
PREFIX libzip PREFIX libzip
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libzip SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libzip
INSTALL_DIR ${LIBZIP_INSTALL_DIR} INSTALL_DIR ${LIBZIP_INSTALL_DIR}
BUILD_BYPRODUCTS ${LIBZIP_INSTALL_DIR}/lib64/libzip.a BUILD_BYPRODUCTS ${LIBZIP_INSTALL_DIR}/${OUTPUT_LIB_DIR}/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 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
) )