diff --git a/CMakeLists.txt b/CMakeLists.txt index ba9af44..13d58a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,13 @@ target_link_libraries(generallib public libevent.a -Wl,--no-whole-archive ) +find_package(libevent REQUIRED) +set(EVENT__HAVE_LIBEVENT 1) + +message(STATUS "libevent include: ${libevent_INCLUDE_DIR}") +message(STATUS "libevent lib: ${libevent_LIBRARIES}") +message(STATUS "libevent lib Dirs: ${libevent_LIB_DIRS}") + message("current path is" ${CMAKE_CURRENT_SOURCE_DIR}) IF (WIN32) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") @@ -29,7 +36,6 @@ IF (WIN32) ${CMAKE_CURRENT_SOURCE_DIR}/libd/libevent.a COMMENT "package library ar -x ${CMAKE_CURRENT_SOURCE_DIR}/libd/libevent.a " ) - add_custom_command ( TARGET generallib POST_BUILD COMMAND ar rc libgeneral.a *.obj