find_package( Eigen3 3.2.0 REQUIRED )
set(python_version "2" CACHE STRING "Specify which python version to use")
MESSAGE(${python_version})
if(python_version VERSION_LESS 3.0.0)
	find_package(PythonInterp 2.7 REQUIRED)
	find_package(PythonLibs 2.7 REQUIRED)
	find_package(NumPy REQUIRED)
	find_package(Boost COMPONENTS python REQUIRED)
else()
	find_package(PythonInterp 3.3 REQUIRED)
	find_package(PythonLibs 3.3 REQUIRED)
	find_package(NumPy REQUIRED)
	find_package(Boost COMPONENTS python-py34)
	if(NOT Boost_FOUND)
		find_package(Boost COMPONENTS python-py33)
	endif()
	if(NOT Boost_FOUND)
		find_package(Boost COMPONENTS python3 REQUIRED)
	endif()
endif()
find_package(OpenMP)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11 -Wall ${OpenMP_CXX_FLAGS}" ) # set global flags
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})

add_subdirectory( constraintloss )
add_subdirectory( optimization )
add_subdirectory( python )
add_subdirectory( util )
