cmake_minimum_required(VERSION 2.6)

project(LIBES CXX)

include(CPackConfig.cmake)

add_definitions(-Wall -g -O2)

if (WIN32)
  add_definitions(-std=c++0x)
else (WIN32)
  add_definitions(-std=c++11)
endif (WIN32)

include_directories("${CMAKE_SOURCE_DIR}/include")

add_subdirectory(lib)

find_package(Doxygen)

if(DOXYGEN_FOUND)
  configure_file("${CMAKE_SOURCE_DIR}/Doxyfile.cmake" "${CMAKE_BINARY_DIR}/Doxyfile" @ONLY)
  add_custom_target(doc ${DOXYGEN_EXECUTABLE} "${CMAKE_BINARY_DIR}/Doxyfile")
endif(DOXYGEN_FOUND)

configure_file("${CMAKE_SOURCE_DIR}/libes0.pc.in" "${CMAKE_BINARY_DIR}/libes0.pc" @ONLY)
install(
  FILES "${CMAKE_BINARY_DIR}/libes0.pc"
  DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig"
)

install(
  DIRECTORY "${CMAKE_SOURCE_DIR}/include/es"
  DESTINATION include
)

cmake_minimum_required(VERSION 2.6)

project(LIBES CXX)

include(CPackConfig.cmake)

add_definitions(-Wall -g -O2)

if (NOT MSVC)
  add_definitions(-std=c++0x) # equivalent of -std=c++11, but the later works only for GCC >= 4.7
endif (NOT MSVC)

include_directories("${CMAKE_SOURCE_DIR}/include")

add_subdirectory(lib)

find_package(Doxygen)

if(DOXYGEN_FOUND)
  configure_file("${CMAKE_SOURCE_DIR}/Doxyfile.cmake" "${CMAKE_BINARY_DIR}/Doxyfile" @ONLY)
  add_custom_target(doc ${DOXYGEN_EXECUTABLE} "${CMAKE_BINARY_DIR}/Doxyfile")
endif(DOXYGEN_FOUND)

configure_file("${CMAKE_SOURCE_DIR}/libes0.pc.in" "${CMAKE_BINARY_DIR}/libes0.pc" @ONLY)
install(
  FILES "${CMAKE_BINARY_DIR}/libes0.pc"
  DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig"
)

install(
  DIRECTORY "${CMAKE_SOURCE_DIR}/include/es"
  DESTINATION include
)

Fix the CMake for GCC 4.6
Fix the CMake for GCC 4.6

 - GCC 4.4, 4.5 and 4.6 uses the flag "-std=c++0x" instead of "-std=c++11"
 - GCC 4.7 and above can use any two of them

NOTE: this is only part of a fix for building against GCC 4.6 ; I will also provide a fix for the source code
NOTE: GCC 4.6 is used under Ubuntu 12.04 current LTS, and so it is the default for Travis Continuous Integration free services
