Skip to content

Commit

Permalink
Detect fmemopen() availability with cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Dec 10, 2013
1 parent 293d25d commit 3631d71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ ENDIF ( EXISTS ${libSpringLobby_BINARY_DIR}/libSpringLobby_config.h OR EXISTS
INCLUDE_DIRECTORIES(${libSpringLobby_SOURCE_DIR}/lib)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

INCLUDE (CheckFunctionExists)

SET(CMAKE_REQUIRED_INCLUDES stdio.h)
CHECK_FUNCTION_EXISTS(fmemopen HAVE_FMEMOPEN)
IF(HAVE_FMEMOPEN)
ADD_DEFINITIONS(-DHAVE_FMEMOPEN)
ENDIF(HAVE_FMEMOPEN)

add_subdirectory( lslutils )
if (LSLSERVER)
add_subdirectory( lsl )
Expand Down
2 changes: 1 addition & 1 deletion src/lslunitsync/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <lslutils/logging.h>


#ifdef WIN32
#if !defined(HAVE_FMEMOPEN)
#include <boost/filesystem.hpp>
//! we need our own fmemopen implementation since its posix only
FILE* fmemopen(void* data, size_t size, const char* mode)
Expand Down

0 comments on commit 3631d71

Please sign in to comment.