aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-03-10 12:13:20 -0600
committerCharles Kerr <charles.kerr@canonical.com>2016-03-10 12:13:20 -0600
commitf8a5d99b5ac03b5b759f67b33ed2c989fc0d0ceb (patch)
treeaacb8c5712b1b47faa87f8ad5831a057aeab1825 /src
parent0194e5f3ea83f13a79f9d87053f6138b79014709 (diff)
downloadayatana-indicator-display-f8a5d99b5ac03b5b759f67b33ed2c989fc0d0ceb.tar.gz
ayatana-indicator-display-f8a5d99b5ac03b5b759f67b33ed2c989fc0d0ceb.tar.bz2
ayatana-indicator-display-f8a5d99b5ac03b5b759f67b33ed2c989fc0d0ceb.zip
cmake and test directory cleanup
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt61
1 files changed, 31 insertions, 30 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ff385d9..6cfda91 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,32 +1,33 @@
-set (SERVICE_LIB "indicatordisplayservice")
-set (SERVICE_EXEC "indicator-display-service")
-add_definitions (-DG_LOG_DOMAIN="${CMAKE_PROJECT_NAME}")
-
-# handwritten source code...
-set (SERVICE_LIB_HANDWRITTEN_SOURCES
- adbd-client.cpp
- exporter.cpp
- indicator.cpp
- rotation-lock.cpp
- usb-snap.cpp)
-
-add_library (${SERVICE_LIB} STATIC
- ${SERVICE_LIB_HANDWRITTEN_SOURCES})
-
-# add the bin dir to the include path so that
-# the compiler can find the generated header files
-include_directories (${CMAKE_CURRENT_BINARY_DIR})
-
-link_directories (${SERVICE_DEPS_LIBRARY_DIRS})
-
-set (SERVICE_EXEC_HANDWRITTEN_SOURCES main.cpp)
-add_executable (${SERVICE_EXEC} ${SERVICE_EXEC_HANDWRITTEN_SOURCES})
-target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} Threads::Threads ${GCOV_LIBS})
-install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR})
-
-# add warnings/coverage info on handwritten files
-# but not the generated ones...
-set_property (SOURCE ${SERVICE_LIB_HANDWRITTEN_SOURCES} ${SERVICE_EXEC_HANDWRITTEN_SOURCES}
- APPEND_STRING PROPERTY COMPILE_FLAGS " -std=c++11 -g ${CXX_WARNING_ARGS} ${GCOV_FLAGS}")
+add_definitions(-DG_LOG_DOMAIN="${CMAKE_PROJECT_NAME}")
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNING_ARGS} ${GCOV_FLAGS}")
+
+add_library(
+ ${SERVICE_LIB}
+ STATIC
+ adbd-client.cpp
+ exporter.cpp
+ indicator.cpp
+ rotation-lock.cpp
+ usb-snap.cpp
+)
+
+add_executable(
+ ${SERVICE_EXEC}
+ main.cpp
+)
+
+target_link_libraries(${SERVICE_EXEC}
+ ${SERVICE_LIB}
+ ${SERVICE_DEPS_LIBRARIES}
+ Threads::Threads
+ ${GCOV_LIBS}
+)
+
+install(
+ TARGETS
+ ${SERVICE_EXEC}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}
+)