find_package can take the "REQUIRED" argument, which will cause cmake to error out if it can't find the specified package. This means you won't have to do all the conditional checking. You could write it like so:

```set(LIBNET_MIN_VERSION)
if(ENABLE_IPV6)
  set(LIBNET_MIN_VERSION 1.1.5)
endif(ENABLE_IPV6)

find_package(LIBNET ${LIBNET_MIN_VERSION} REQUIRED)

include_directories(${LIBNET_INCLUDE_DIR})
set(EC_LIBS ${EC_LIBS} ${LIBNET_LIBRARY})
```

I haven't tested this out, but I may have some time later today.