find_path(LIBCONFIG++_INCLUDE_DIR NAMES libconfig.h++ /usr/include /usr/local/include)
mark_as_advanced(LIBCONFIG++_INCLUDE_DIR)

find_library(LIBCONFIG++_LIBRARY NAMES config++ PATH /usr/lib /usr/local/lib)
mark_as_advanced(LIBCONFIG++_LIBRARY)

if (LIBCONFIG++_INCLUDE_DIR AND LIBCONFIG++_LIBRARY)
	set(LIBCONFIG++_FOUND TRUE)
	set(LIBCONFIG++_INCLUDE_DIRS ${LIBCONFIG++_INCLUDE_DIR})
	set(LIBCONFIG++_LIBRARIES ${LIBCONFIG++_LIBRARY})
endif ()

if (LIBCONFIG++_FOUND)
	if (NOT LIBCONFIG++_FIND_QUIETLY)
		#message(STATUS "Found Config++: ${LIBCONFIG++_LIBRARY}")
	endif ()
else ()
	if (Libconfig++_FIND_REQUIRED)
		if (NOT LIBCONFIG++_INCLUDE_DIR)
			message(FATAL_ERROR "Could not find LibConfig++ header file!")
		endif ()

		if (NOT LIBCONFIG++_LIBRARY)
			message(FATAL_ERROR "Could not find LibConfig++ library file!")
		endif ()
	endif ()
endif ()
