diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1e7c02..17b0a1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,12 +41,16 @@ endif (UNIX)
 
 string (REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
 
+find_package(Libevent CONFIG REQUIRED)
+find_package(glog CONFIG REQUIRED)
+set(DEPENDENT_LIBRARIES libevent::core libevent::extra libevent::openssl glog::glog)
 if (UNIX)
     SET(CMAKE_CXX_FLAGS_DEBUG   "-O0 -g -ggdb -D_DEBUG -DGOOGLE_STRIP_LOG=0")
     SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -ggdb -DNDEBUG -DGOOGLE_STRIP_LOG=1")
-    SET(DEPENDENT_LIBRARIES event glog pthread)
+    set(THREADS_PREFER_PTHREAD_FLAG ON)
+    find_package(Threads REQUIRED)
+    list(APPEND DEPENDENT_LIBRARIES Threads::Threads)
 else (UNIX)
-    SET(DEPENDENT_LIBRARIES event glog)
 endif (UNIX)
 
 if (CMAKE_BENCHMARK_TESTING)
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
index 469ed1c..fc6762a 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -2,12 +2,9 @@
 include_directories(${PROJECT_SOURCE_DIR}/apps ${PROJECT_SOURCE_DIR}/3rdparty)
 
 if (UNIX)
-set(LIBRARIES evpp_concurrentqueue event glog pthread)
-link_directories("/home/s/safe/lib" ${PROJECT_BUILD_DIR}/lib)
+    set(LIBRARIES $<IF:$<TARGET_EXISTS:evpp_concurrentqueue>,evpp_concurrentqueue,evpp_concurrentqueue_static> glog::glog Threads::Threads)
 else(UNIX)
-set(LIBRARIES evpp_static event glog)
-link_directories(${PROJECT_SOURCE_DIR}/vsprojects/bin/${CMAKE_BUILD_TYPE}/
-				 ${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/)
+    set(LIBRARIES evpp_static glog::glog)
 endif(UNIX)
 
 add_subdirectory(evnsq)
diff --git a/evpp/CMakeLists.txt b/evpp/CMakeLists.txt
index 1dfd91b..73ee071 100644
--- a/evpp/CMakeLists.txt
+++ b/evpp/CMakeLists.txt
@@ -38,6 +38,9 @@ if (UNIX)
     target_compile_definitions(evpp_concurrentqueue_static PRIVATE -DH_HAVE_CAMERON314_CONCURRENTQUEUE=1)
     target_link_libraries(evpp_concurrentqueue        PRIVATE ${DEPENDENT_LIBRARIES})
     target_link_libraries(evpp_concurrentqueue_static PRIVATE ${DEPENDENT_LIBRARIES})
+    find_package(unofficial-concurrentqueue REQUIRED)
+    target_link_libraries(evpp_concurrentqueue        PRIVATE unofficial::concurrentqueue::concurrentqueue)
+    target_link_libraries(evpp_concurrentqueue_static PRIVATE unofficial::concurrentqueue::concurrentqueue)
 
     set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
     include (utils)
