~ps-jenkins/indicator-transfer/ubuntu-vivid-proposed

« back to all changes in this revision

Viewing changes to src/CMakeLists.txt

  • Committer: Ted Gould
  • Author(s): Charles Kerr
  • Date: 2014-06-18 19:26:56 UTC
  • mfrom: (1.2.20 indicator-transfer)
  • Revision ID: ted@gould.cx-20140618192656-ufycr3k7g5w0en4u
This sets up the code layout, menu, indicator, unit tests, code coverage rules, etc... what you'd expect from an indicator.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set (SERVICE_LIB "indicatortransferservice")
 
2
set (SERVICE_EXEC "indicator-transfer-service")
 
3
 
 
4
add_definitions (-DG_LOG_DOMAIN="${CMAKE_PROJECT_NAME}")
 
5
 
 
6
# handwritten source code...
 
7
set (SERVICE_LIB_HANDWRITTEN_SOURCES
 
8
     controller.cpp
 
9
     model.cpp
 
10
     view.cpp
 
11
     view-gmenu.cpp
 
12
     world.cpp
 
13
     world-dbus.cpp)
 
14
 
 
15
add_library (${SERVICE_LIB} STATIC
 
16
             ${SERVICE_LIB_HANDWRITTEN_SOURCES})
 
17
 
 
18
# add the bin dir to the include path so that
 
19
# the compiler can find the generated header files
 
20
include_directories (${CMAKE_CURRENT_BINARY_DIR})
 
21
 
 
22
link_directories (${SERVICE_DEPS_LIBRARY_DIRS})
 
23
 
 
24
set (SERVICE_EXEC_HANDWRITTEN_SOURCES main.cpp)
 
25
add_executable (${SERVICE_EXEC} ${SERVICE_EXEC_HANDWRITTEN_SOURCES})
 
26
target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${GCOV_LIBS})
 
27
install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR})
 
28
 
 
29
# add warnings/coverage info on handwritten files
 
30
# but not the generated ones...
 
31
set_property (SOURCE ${SERVICE_LIB_HANDWRITTEN_SOURCES} ${SERVICE_EXEC_HANDWRITTEN_SOURCES}
 
32
              APPEND_STRING PROPERTY COMPILE_FLAGS " -std=c++11 -g ${CXX_WARNING_ARGS} ${GCOV_FLAGS}")
 
33