~qqworini/aesydict/online-improve

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Joey Chan
  • Date: 2015-03-14 11:42:38 UTC
  • Revision ID: qqworini@gmail.com-20150314114238-xx0ivhxhwt7hcotc
add full cmake support

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Tells QtCreator location and name of the manifest file")
6
6
 
7
7
find_package(Qt5Core)
 
8
find_package(Qt5Gui)
8
9
find_package(Qt5Qml)
9
10
find_package(Qt5Quick)
10
11
# Find_package(ubuntu-sdk-libs)
19
20
    OUTPUT_STRIP_TRAILING_WHITESPACE
20
21
)
21
22
 
22
 
set(CLICK_ARCH "all")
23
 
# If you want to add native code to your project, replace the set CLICK_ARCH command
24
 
# with the following part.
25
 
# This command figures out the target architecture for use in the manifest file
26
 
# execute_process(
27
 
#   COMMAND dpkg-architecture -qDEB_HOST_ARCH
28
 
#   OUTPUT_VARIABLE CLICK_ARCH
29
 
#   OUTPUT_STRIP_TRAILING_WHITESPACE
30
 
# )
 
23
#set(CLICK_ARCH "all")
 
24
#If you want to add native code to your project, replace the set CLICK_ARCH command
 
25
#with the following part.
 
26
#This command figures out the target architecture for use in the manifest file
 
27
 execute_process(
 
28
   COMMAND dpkg-architecture -qDEB_HOST_ARCH
 
29
   OUTPUT_VARIABLE CLICK_ARCH
 
30
   OUTPUT_STRIP_TRAILING_WHITESPACE
 
31
 )
31
32
 
32
33
set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
33
34
 
34
 
option(INSTALL_TESTS "Install the tests on make install" on)
 
35
#option(INSTALL_TESTS "Install the tests on make install" on)
35
36
 
36
 
set(APP_NAME          aesydict)
 
37
set(APP_NAME          AesyDict)
37
38
set(APP_ID            "aesydict.qqworini")
38
39
set(AESYDICT_DIR "share/qml/aesydict")
39
40
set(MAIN_QML          "aesydict.qml")
41
42
 
42
43
# Set install paths
43
44
set(CMAKE_INSTALL_PREFIX /)
 
45
set(CMAKE_INSTALL_BINDIR /)
44
46
set(DATA_DIR /)
45
47
set(DESKTOP_DIR ${DATA_DIR})
46
48
set(DESKTOP_FILE_NAME "AesyDict.desktop")
47
49
 
48
50
# This sets the commandline that is executed on the device
49
 
set(EXEC "qmlscene $@ ${AESYDICT_DIR}/${MAIN_QML}")
 
51
set(EXEC "aesydict")
50
52
 
51
53
# Configures the manifest file. The manifest file describes the click package
52
54
# to the target system. All cmake variables that are defined at this point
58
60
install(DIRECTORY "app/graphics" DESTINATION ${DATA_DIR})
59
61
install(FILES "AesyDict.apparmor" DESTINATION ${DATA_DIR})
60
62
 
 
63
add_subdirectory(src)
61
64
add_subdirectory(app)
62
65
add_subdirectory(po)
63
66
 
64
 
add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
65
 
                    COMMAND ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
66
 
                    WORKING_DIRECTORY ./app)
67
 
 
68
 
add_custom_target("check" /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/app/tests/unit -import ${CMAKE_BINARY_DIR}/backend
69
 
                    WORKING_DIRECTORY ./app)
70
 
 
71
 
add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend  ${CMAKE_SOURCE_DIR}/app/aesydict.qml
72
 
                    WORKING_DIRECTORY ./app)
 
67
# add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
 
68
#                     COMMAND ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
 
69
#                     WORKING_DIRECTORY ./app)
 
70
 
71
# add_custom_target("check" /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/app/tests/unit -import ${CMAKE_BINARY_DIR}/backend
 
72
#                     WORKING_DIRECTORY ./app)
 
73
 
74
# add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend  ${CMAKE_SOURCE_DIR}/app/aesydict.qml
 
75
#                     WORKING_DIRECTORY ./app)
73
76
 
74
77
# Normally QtCreator would only show files that are part of a target, but we need it to show also files 
75
78
# that are not compiled. Therefore we add a custom target that just does nothing but list the files