project(qpicalc)
find_qt(${QtVersions} Core Gui Widgets)
qt_sources(SRC)
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qad_graphic)
message(STATUS "Building ${PROJECT_NAME}")
if(LIB)
	if(WIN32)
		qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
	else()
		if(APPLE)
			qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
		else()
			qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
		endif()
	endif()
	#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
	qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
	#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()

