#FIND_PACKAGE(Sqlite3 REQUIRED)
FIND_PACKAGE(SPATIALITE REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(Protobuf REQUIRED)
FIND_PACKAGE(ShapeLib REQUIRED)
FIND_PACKAGE(PkgConfig REQUIRED)
FIND_PACKAGE(PNG REQUIRED)
# Boost

# -DBoost_NO_BOOST_CMAKE=ON  -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_ROOT=<local boost install>
set(Boost_ADDITIONAL_VERSIONS "1.49" "1.50.0" "1.51" "1.52" "1.53" "1.54")
set(Boost_USE_STATIC_LIBS       OFF)
set(Boost_USE_MULTITHREADED      ON)
set(Boost_USE_STATIC_RUNTIME    OFF)

set(BOOST_COMPONENTS regex filesystem system serialization coroutine context program_options)

#IF ( WIN32 )
#    set(BOOST_COMPONENTS ${BOOST_COMPONENTS} thread_win32)
#ELSE( WIN32 )
    set(BOOST_COMPONENTS ${BOOST_COMPONENTS} thread)
#ENDIF( WIN32 )

FIND_PACKAGE(Boost 1.49 REQUIRED COMPONENTS ${BOOST_COMPONENTS})

FIND_PACKAGE(OpenGL REQUIRED)
PKG_SEARCH_MODULE(GLFW REQUIRED glfw3)
FIND_PACKAGE(GLEW REQUIRED)

#FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtWebKit QtNetwork)
FIND_PACKAGE(Qt5 COMPONENTS Core Widgets Network Xml REQUIRED)

#FIND_PACKAGE(OpenJPEG REQUIRED)


FIND_PACKAGE(Freetype REQUIRED)
FIND_PACKAGE(Fontconfig REQUIRED)
FIND_PACKAGE(Cairo REQUIRED)
FIND_PACKAGE(HarfBuzz REQUIRED)
FIND_PACKAGE(GEOS 3.4.2 REQUIRED)
FIND_PACKAGE(PROJ4 REQUIRED)

find_package(OpenMP)
if (OPENMP_FOUND)
	set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
	set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()


FIND_PACKAGE(Lua 5.2 REQUIRED)

