on 6e36a85 help sign in
unity8/src/CMakeLists.txt
64 lines 1.8 kB history raw
1add_subdirectory(libunity8-private)
3pkg_check_modules(CONNECTIVITY REQUIRED connectivity-qt1)
4pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
6include_directories(
7 SYSTEM
8 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
9 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
10 ${GSETTINGS_QT_INCLUDE_DIRS}
11 ${CONNECTIVITY_INCLUDE_DIRS}
14include_directories(
15 ${libunity8-private_SOURCE_DIR}
18file(GLOB_RECURSE QML_FILES
19 ${CMAKE_SOURCE_DIR}/qml/*
20 ${CMAKE_SOURCE_DIR}/tests/*.qml
21 ${CMAKE_SOURCE_DIR}/tests/*.js
22 ${CMAKE_SOURCE_DIR}/tests/*.jpg
23 ${CMAKE_SOURCE_DIR}/tests/*.png
24 ${CMAKE_SOURCE_DIR}/tests/*.sci
25 ${CMAKE_SOURCE_DIR}/tests/*.svg
28set(SOURCE_FILES
29 ApplicationArguments.cpp
30 main.cpp
31 CachingNetworkManagerFactory.cpp
32 SecondaryWindow.cpp
33 ShellApplication.cpp
34 ShellView.cpp
35 UnityCommandLineParser.cpp
36 UnixSignalHandler.cpp
37 DebuggingController.cpp
38 ${QML_FILES} # This is to make qml and image files appear in the IDE's project tree
41if (ENABLE_TOUCH_EMULATION)
42 set(SOURCE_FILES ${SOURCE_FILES} MouseTouchAdaptor.cpp)
43endif()
45pkg_check_modules(ANDROID_PROPERTIES REQUIRED libandroid-properties)
46add_executable(${SHELL_APP} ${SOURCE_FILES})
48if (NOT "${ANDROID_PROPERTIES_INCLUDE_DIRS}" STREQUAL "")
49 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${ANDROID_PROPERTIES_INCLUDE_DIRS})
50endif()
51target_link_libraries(${SHELL_APP}
52 Qt5::DBus Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Test
53 ${ANDROID_PROPERTIES_LDFLAGS} ${GSETTINGS_QT_LDFLAGS}
54 UbuntuGestures connectivity-qt1 unity8-private
55 )
57if (ENABLE_TOUCH_EMULATION)
58 target_link_libraries(${SHELL_APP} ${MOUSETOUCHADAPTOR_LIBS_LDFLAGS})
59endif()
61# install binaries
62install(TARGETS ${SHELL_APP}
63 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
64 )