Merge pull request #5076 from ygorshenin/fix-cmake-desktop-app-build

[cmake] Fixed desktop app build on Linux.
This commit is contained in:
therearesomewhocallmetim 2016-12-21 15:51:49 +03:00 committed by GitHub
commit 2aa4ea3812
2 changed files with 11 additions and 2 deletions

View file

@ -81,6 +81,10 @@ if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID)
find_package(Qt5Widgets REQUIRED)
endif()
if (PLATFORM_LINUX)
find_package(OpenGL)
endif()
find_library(LIBZ NAMES z)
if (LIBZ STREQUAL "LIBZ-NOTFOUND")
message(FATAL_ERROR "Failed to find libz library.")

View file

@ -52,7 +52,7 @@ set(
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${RES_SOURCES} ${SRC})
target_link_libraries(
omim_link_libraries(
${PROJECT_NAME}
map
drape_frontend
@ -81,8 +81,9 @@ target_link_libraries(
oauthcpp
opening_hours
${Qt5Core_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Network_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${LIBZ}
)
@ -105,6 +106,10 @@ if (PLATFORM_MAC)
)
endif()
if (PLATFORM_LINUX)
target_link_libraries(${PROJECT_NAME} ${OPENGL_gl_LIBRARY})
endif()
function(copy_resources)
set(files "")
foreach(file ${ARGN})