CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)

PROJECT(mqtt)

SET(CMAKE_VERBOSE_MAKEFILE OFF)

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Werror -std=c++11")

FIND_PACKAGE(LibEvent REQUIRED)
IF (NOT LibEvent_FOUND)
    MESSAGE(FATAL_ERROR "Libevent required but not found")
ENDIF()

FIND_PACKAGE(OsspUUID REQUIRED)
IF (NOT OsspUUID_FOUND)
    MESSAGE(FATAL_ERROR "Ossp UUID required but not found")
ENDIF()

ADD_SUBDIRECTORY(src)

ADD_SUBDIRECTORY(test)

CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)

PROJECT(mqtt)

SET(CMAKE_VERBOSE_MAKEFILE OFF)

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Werror -std=c++11")

FIND_PACKAGE(LibEvent REQUIRED)
IF (NOT LibEvent_FOUND)
    MESSAGE(FATAL_ERROR "Libevent required but not found")
ENDIF()

FIND_PACKAGE(OsspUUID REQUIRED)
IF (NOT OsspUUID_FOUND)
    MESSAGE(FATAL_ERROR "Ossp UUID required but not found")
ENDIF()

ADD_SUBDIRECTORY(src)

ADD_SUBDIRECTORY(test)

Add optimize flag to compiler arguments.
Add optimize flag to compiler arguments.
