kopia lustrzana https://github.com/stlink-org/stlink
cmake: Add proper detection of sys/mman.h. Fixes #450
Signed-off-by: Jerry Jacobs <jerry.jacobs@dualinventive.com>pull/434/head
rodzic
df1522b7db
commit
57cf59a869
|
@ -2,6 +2,7 @@ project(stlink C)
|
|||
cmake_minimum_required(VERSION 2.8.7)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckIncludeFile)
|
||||
find_package(PkgConfig)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/cmake/modules")
|
||||
|
@ -47,6 +48,11 @@ elseif()
|
|||
add_cflag_if_supported("-O2")
|
||||
endif()
|
||||
|
||||
CHECK_INCLUDE_FILE(sys/mman.h STLINK_HAVE_SYS_MMAN_H)
|
||||
if (STLINK_HAVE_SYS_MMAN_H)
|
||||
add_definitions(-DSTLINK_HAVE_SYS_MMAN_H)
|
||||
endif()
|
||||
|
||||
set(STLINK_HEADERS
|
||||
include/stlink.h
|
||||
include/stlink/usb.h
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef STLINK_MMAP_H
|
||||
#define STLINK_MMAP_H
|
||||
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#ifdef STLINK_HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#else
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue