set(MODULE_NAME "teaclient_dns") set(SOURCE_FILES ${SOURCE_FILES} src/resolver.cpp src/types.cpp src/response.cpp utils.cpp src/resolver_linux.cpp) find_package(Libevent REQUIRED) include_directories(${LIBEVENT_INCLUDE_DIRS}) find_package(unbound REQUIRED) add_nodejs_module(${MODULE_NAME} binding.cc ${SOURCE_FILES}) target_link_libraries(${MODULE_NAME} unbound::static ${LIBEVENT_STATIC_LIBRARIES} pthread) add_executable(DNS-Test ${SOURCE_FILES} test/main.cpp) target_link_libraries(DNS-Test unbound::static ssl crypto ${LIBEVENT_STATIC_LIBRARIES} pthread) add_executable(DNS-Test2 test/crash.cpp) target_link_libraries(DNS-Test2 unbound::static ssl crypto ${LIBEVENT_STATIC_LIBRARIES} pthread)