cmake_minimum_required(VERSION 2.6)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} . ../)
file(GLOB CPPS "*.cpp")
add_definitions(-Wall -O2)
add_executable(pip_cmg "main.cpp")
target_link_libraries(pip_cmg pip)
if (DEFINED LIB)
	unset(LIB)
	if (${WIN32})
		get_filename_component(MGWDIR ${CMAKE_C_COMPILER} PATH)
		set(CMAKE_INSTALL_PREFIX)
		install(TARGETS pip_cmg DESTINATION ${MGWDIR}/../bin)
	else ()
		set(CMAKE_INSTALL_PREFIX /usr)
		install(TARGETS pip_cmg DESTINATION bin)
	endif ()
endif ()
