From 8fee85b01338dd9bca10beeb5e7a827e241a8fe5 Mon Sep 17 00:00:00 2001 From: tux3 Date: Fri, 14 Dec 2018 14:38:35 +0100 Subject: [PATCH] Fix CMake not finding getpagesize for Android 19 --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4779087..9fe5837 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ -cmake_minimum_required (VERSION 2.8.8) +cmake_minimum_required (VERSION 3.0) include(CheckFunctionExists) +include(CheckSymbolExists) include(CheckLibraryExists) include(CheckIncludeFiles) include(CheckTypeSize) @@ -231,7 +232,7 @@ if(HAVE_GETENTROPY) add_definitions(-DHAVE_GETENTROPY) endif() -check_function_exists(getpagesize HAVE_GETPAGESIZE) +check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) if(HAVE_GETPAGESIZE) add_definitions(-DHAVE_GETPAGESIZE) endif()