Use directories relative to current project in CheckFileOffsetBits.cmake

Enables building OpenAL Soft in a subdirectory of another project.
This commit is contained in:
Jesper Särnesjö 2014-08-20 18:03:29 +10:00 committed by Chris Robinson
parent e3d72ccd15
commit ba9995a8de

View File

@ -17,13 +17,13 @@ MACRO(CHECK_FILE_OFFSET_BITS)
IF(NOT DEFINED _FILE_OFFSET_BITS)
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files")
TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/cmake/CheckFileOffsetBits.c
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckFileOffsetBits.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/cmake/CheckFileOffsetBits.c
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckFileOffsetBits.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)