Skip to content

Commit

Permalink
Detect support for "posix_memalign" in cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
fancycode committed Jun 8, 2018
1 parent c17c8bf commit 25ae34d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -6,13 +6,15 @@ set (NUMERIC_VERSION 0x01000000)
set (PACKAGE_VERSION 1.0.0)

include (${CMAKE_ROOT}/Modules/CheckCCompilerFlag.cmake)
include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
include (${CMAKE_ROOT}/Modules/FindSDL.cmake)
include (${CMAKE_ROOT}/Modules/FindThreads.cmake)

CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H)
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
CHECK_FUNCTION_EXISTS(posix_memalign HAVE_POSIX_MEMALIGN)

if (HAVE_MALLOC_H)
add_definitions(-DHAVE_MALLOC_H)
Expand All @@ -23,6 +25,9 @@ endif()
if (HAVE_STDBOOL_H)
add_definitions(-DHAVE_STDBOOL_H)
endif()
if (HAVE_POSIX_MEMALIGN)
add_definitions(-DHAVE_POSIX_MEMALIGN)
endif()

configure_file (
"${PROJECT_SOURCE_DIR}/libde265/de265-version.h.in"
Expand Down

0 comments on commit 25ae34d

Please sign in to comment.