Browse Source

Fix caching of libev configuration

personal/stbuehler/wip
Stefan Bühler 13 years ago
parent
commit
e88895bd0c
  1. 13
      cmake/FindLibEV.cmake

13
cmake/FindLibEV.cmake

@ -8,6 +8,10 @@ IF(LIBEV_PATH)
SET(LIBEV_LIBDIR "${LIBEV_PATH}/lib" CACHE PATH "Path containing libev" FORCE)
ENDIF(LIBEV_PATH)
IF(LIBEV_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${LIBEV_INCLUDE_PATH})
ENDIF(LIBEV_INCLUDE_PATH)
# Use cached result
IF(NOT LIBEV_FOUND)
UNSET(HAVE_EV_H)
@ -25,9 +29,8 @@ IF(NOT LIBEV_FOUND)
# MESSAGE(STATUS "Looking for lib ev in ${LIBEV_LIBDIR}")
CHECK_LIBRARY_EXISTS(ev ev_loop "${LIBEV_LIBDIR}" HAVE_LIBEV)
IF(HAVE_LIBEV)
INCLUDE_DIRECTORIES(${LIBEV_INCLUDE_PATH})
SET(LIBEV_CFLAGS "")
SET(LIBEV_LDFLAGS "-L${LIBEV_LIBDIR} -lev")
SET(LIBEV_CFLAGS "" CACHE INTERNAL "")
SET(LIBEV_LDFLAGS "-L${LIBEV_LIBDIR} -lev" CACHE INTERNAL "")
SET(LIBEV_FOUND TRUE CACHE INTERNAL "Found libev" FORCE)
ELSE(HAVE_LIBEV)
MESSAGE(STATUS "Couldn't find lib ev in ${LIBEV_LIBDIR}")
@ -44,8 +47,8 @@ IF(NOT LIBEV_FOUND)
# MESSAGE(STATUS "Looking for lib ev")
CHECK_LIBRARY_EXISTS(ev ev_loop "" HAVE_LIBEV)
IF(HAVE_LIBEV)
SET(LIBEV_CFLAGS "")
SET(LIBEV_LDFLAGS "-lev")
SET(LIBEV_CFLAGS "" CACHE INTERNAL "")
SET(LIBEV_LDFLAGS "-lev" CACHE INTERNAL "")
SET(LIBEV_FOUND TRUE CACHE INTERNAL "Found libev" FORCE)
ELSE(HAVE_LIBEV)
MESSAGE(STATUS "Couldn't find lib ev")

Loading…
Cancel
Save