From f55d5545a65cb4f0de835ea8e68b3ebd71d8eb10 Mon Sep 17 00:00:00 2001 From: Sergey Magidovich Date: Mon, 30 Jan 2017 18:30:46 +0300 Subject: [PATCH] Fix cmake build. --- openlr/openlr_stat/CMakeLists.txt | 2 ++ openlr/router.cpp | 8 ++++---- qt/CMakeLists.txt | 9 +++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/openlr/openlr_stat/CMakeLists.txt b/openlr/openlr_stat/CMakeLists.txt index dbaaaaf697..54d2b10278 100644 --- a/openlr/openlr_stat/CMakeLists.txt +++ b/openlr/openlr_stat/CMakeLists.txt @@ -1,5 +1,7 @@ project(openlr_stat) +include_directories(${OMIM_ROOT}/3party/gflags/src) + set( SRC openlr_stat.cpp diff --git a/openlr/router.cpp b/openlr/router.cpp index 896f1176a8..43babc9ab6 100644 --- a/openlr/router.cpp +++ b/openlr/router.cpp @@ -35,7 +35,7 @@ uint32_t Bearing(m2::PointD const & a, m2::PointD const & b) auto const angle = location::AngleToBearing(my::RadToDeg(ang::AngleTo(a, b))); CHECK_LESS_OR_EQUAL(angle, 360, ("Angle should be less than or equal to 360.")); CHECK_GREATER_OR_EQUAL(angle, 0, ("Angle should be greater than or equal to 0")); - return my::clamp(angle / kAnglesInBucket, 0, 255); + return my::clamp(angle / kAnglesInBucket, 0.0, 255.0); } class Score final @@ -595,8 +595,8 @@ double Router::GetCoverage(m2::PointD const & u, m2::PointD const & v, It b, It double const sp = DotProduct(uv, s - u) / sqlen; double const tp = DotProduct(uv, t - u) / sqlen; - double const start = my::clamp(min(sp, tp), 0, 1); - double const finish = my::clamp(max(sp, tp), 0, 1); + double const start = my::clamp(min(sp, tp), 0.0, 1.0); + double const finish = my::clamp(max(sp, tp), 0.0, 1.0); covs.emplace_back(start, finish); } @@ -650,7 +650,7 @@ double Router::GetMatchingScore(m2::PointD const & u, m2::PointD const & v, It b cov += MercatorBounds::DistanceOnEarth(s, t); } - return len == 0 ? 0 : my::clamp(cov / len, 0, 1); + return len == 0 ? 0 : my::clamp(cov / len, 0.0, 1.0); } template diff --git a/qt/CMakeLists.txt b/qt/CMakeLists.txt index 6c9deed978..75323bd169 100644 --- a/qt/CMakeLists.txt +++ b/qt/CMakeLists.txt @@ -1,6 +1,7 @@ project(desktop) set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) QT5_ADD_RESOURCES(RES_SOURCES res/resources.qrc) @@ -13,6 +14,7 @@ execute_process( include_directories( ${OMIM_ROOT}/3party/glm + ${CMAKE_CURRENT_BINARY_DIR} ) set( @@ -46,6 +48,12 @@ set( search_panel.hpp slider_ctrl.cpp slider_ctrl.hpp + traffic_mode.cpp + traffic_mode.hpp + traffic_panel.cpp + traffic_panel.hpp + trafficmodeinitdlg.cpp + trafficmodeinitdlg.h update_dialog.cpp update_dialog.hpp ) @@ -80,6 +88,7 @@ omim_link_libraries( pugixml oauthcpp opening_hours + openlr ${Qt5Gui_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Widgets_LIBRARIES}