From 916515f0d7502c4c711ea9fde357ebd870d0782d Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 8 Jul 2015 14:57:51 -1000 Subject: [PATCH] OS X build fixes --- CMakeLists.txt | 8 +++++--- src/aes.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d607ebd..b6e6ca2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,9 @@ set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation director foreach(p LIB INCLUDE CMAKE) set(var INSTALL_${p}_DIR) if(NOT IS_ABSOLUTE "${${var}}") - set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + set(ABS_${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + else() + set(ABS_${var} "${${var}}") endif() endforeach() @@ -195,8 +197,8 @@ set(CONF_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include") set(CONF_ICON_DIR "${PROJECT_SOURCE_DIR}/Athena.ico") configure_file(AthenaConfig.cmake.in "${PROJECT_BINARY_DIR}/AthenaConfig.cmake" @ONLY) # ... for the install tree -file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}") -file(RELATIVE_PATH REL_ICON_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_LIB_DIR}/Athena.ico") +file(RELATIVE_PATH REL_INCLUDE_DIR "${ABS_INSTALL_CMAKE_DIR}" "${ABS_INSTALL_INCLUDE_DIR}") +file(RELATIVE_PATH REL_ICON_DIR "${ABS_INSTALL_CMAKE_DIR}" "${ABS_INSTALL_LIB_DIR}/Athena.ico") set(CONF_INCLUDE_DIR "\${ATHENA_CMAKE_DIR}/${REL_INCLUDE_DIR}") set(CONF_ICON_DIR "\${ATHENA_CMAKE_DIR}/${REL_ICON_DIR}") configure_file(AthenaConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/AthenaConfig.cmake" @ONLY) diff --git a/src/aes.cpp b/src/aes.cpp index b9f1688..8942be5 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -400,7 +400,7 @@ void SoftwareAES::setKey(const uint8_t* key) } // CBC mode decryption -void SoftwareAES::decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, size_t len) +void SoftwareAES::decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len) { uint8_t block[16]; const uint8_t* ctext_ptr;