~davidc3/ubuntu-sdk-tutorials/scope-tutorial-settings-may2015

« back to all changes in this revision

Viewing changes to src/CMakeLists.txt

  • Committer: David Callé
  • Date: 2015-05-20 22:02:45 UTC
  • Revision ID: davidc@framli.eu-20150520220245-fai23juqq7f6pb2q
Simple scope with settings

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# Put the ini files in the build directory next to the scope
 
3
# .so file so that the test tools can find them.
 
4
intltool_merge_translations(
 
5
  "data/settings-for-scopes-v2.ini.in"
 
6
  "${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.ini"
 
7
  ALL
 
8
  UTF8
 
9
)
 
10
intltool_merge_translations(
 
11
  "data/settings-for-scopes-v2-settings.ini.in"
 
12
  "${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}-settings.ini"
 
13
  ALL
 
14
  UTF8
 
15
)
 
16
 
 
17
# Install the scope ini files
 
18
install(
 
19
  FILES
 
20
    "${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.ini"
 
21
    "${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}-settings.ini"
 
22
  DESTINATION
 
23
    ${SCOPE_INSTALL_DIR}
 
24
)
 
25
 
 
26
# Put the logo file in the build directory next to the scope
 
27
# .ini file so that the test tools can find it.
 
28
configure_file(
 
29
  "data/logo.png"
 
30
  "${CMAKE_CURRENT_BINARY_DIR}/logo.png"
 
31
  @ONLY
 
32
  COPYONLY
 
33
)
 
34
 
 
35
# Install the scope images
 
36
install(
 
37
  FILES
 
38
    "data/icon.png"
 
39
    "data/logo.png"
 
40
    "data/screenshot.png"
 
41
  DESTINATION
 
42
    ${SCOPE_INSTALL_DIR}
 
43
)
 
44
 
 
45
# Find all the sources
 
46
file(GLOB_RECURSE
 
47
  SCOPE_SOURCES
 
48
  "*.cpp"
 
49
  "*.h"
 
50
)
 
51
 
 
52
# Build a shared library containing our scope code.
 
53
add_library(
 
54
  scope SHARED
 
55
  ${SCOPE_SOURCES}
 
56
)
 
57
 
 
58
# Link against the object library and our external library dependencies
 
59
target_link_libraries(
 
60
  scope
 
61
  ${SCOPE_LDFLAGS}
 
62
)
 
63
 
 
64
qt5_use_modules(
 
65
  scope
 
66
  Core
 
67
)
 
68
 
 
69
# Set the correct library output name to conform to the securiry policy 
 
70
set_target_properties(
 
71
  scope
 
72
  PROPERTIES
 
73
    OUTPUT_NAME "${SCOPE_NAME}"
 
74
)
 
75
 
 
76
# Install the scope shared library
 
77
install(
 
78
  TARGETS scope
 
79
  LIBRARY DESTINATION ${SCOPE_INSTALL_DIR}
 
80
)
 
81