diff --git a/cmake/modules/FindLibevent2.cmake b/cmake/modules/FindLibevent2.cmake index 99b25be0..167d1249 100644 --- a/cmake/modules/FindLibevent2.cmake +++ b/cmake/modules/FindLibevent2.cmake @@ -35,8 +35,8 @@ if (PKG_CONFIG_FOUND) endif () if (PkgLibevent_FOUND) - set(LIBEVENT2_INCLUDE_DIR ${PkgLibevent_INCLUDE_DIRS} CACHE FILEPATH "libevent2 include path") - set(LIBEVENT2_LIBRARIES ${PkgLibevent_LIBRARIES} CACHE STRING "libevent2 libraries") + set(LIBEVENT2_INCLUDE_DIR ${PkgLibevent_INCLUDE_DIRS} CACHE FILEPATH "libevent2 include path" FORCE) + set(LIBEVENT2_LIBRARIES ${PkgLibevent_LIBRARIES} CACHE STRING "libevent2 libraries" FORCE) set(LIBEVENT2_VERSION ${PkgLibevent_VERSION}) add_library(Libevent2::Libevent_core ALIAS PkgConfig::PkgLibevent) set(Libevent2_FOUND ON)