File tree Expand file tree Collapse file tree 6 files changed +48
-19
lines changed Expand file tree Collapse file tree 6 files changed +48
-19
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ string(REGEX REPLACE "^%C%([^\n]*)" "\\1" file_content "${file_content}")
24
24
25
25
file (WRITE "${CMAKE_BINARY_DIR} /direwolf.conf" "${file_content} " )
26
26
27
-
28
27
# install udev rules for CM108
29
28
if (LINUX )
30
29
install (FILES "${CUSTOM_CONF_DIR} /99-direwolf-cmedia.rules" DESTINATION etc/udev/rules.d/ )
@@ -37,12 +36,13 @@ install(FILES "${CUSTOM_CONF_DIR}/sdr.conf" DESTINATION share/doc/${CMAKE_PROJEC
37
36
# This step would be done as ordinary user.
38
37
# Some people like to put the direwolf config file in /etc/ax25.
39
38
# Note that all of these are also in $(DESTDIR)/share/doc/direwolf/examples/.
40
- add_custom_target (install -conf-conf
41
- COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR} /direwolf.conf" ~
42
- COMMAND ${CMAKE_COMMAND} -E copy "${CUSTOM_CONF_DIR} /sdr.conf" ~
43
- )
44
-
45
39
if (NOT WIN32 )
46
- add_custom_target (install -conf )
47
- add_dependencies (install -conf install -conf-conf install -conf-scripts install -conf-telemetry )
40
+ add_custom_target (install -conf
41
+ COMMAND ${CMAKE_COMMAND}
42
+ -DCMAKE_BINARY_DIR= "${CMAKE_BINARY_DIR} "
43
+ -DCUSTOM_CONF_DIR= "${CUSTOM_CONF_DIR} "
44
+ -DCUSTOM_SCRIPTS_DIR= "${CUSTOM_SCRIPTS_DIR} "
45
+ -DCUSTOM_TELEMETRY_DIR= "${CUSTOM_TELEMETRY_DIR} "
46
+ -P "${CMAKE_SOURCE_DIR} /conf/install_conf.cmake"
47
+ )
48
48
endif ()
Original file line number Diff line number Diff line change
1
+ if (NOT EXISTS ~/direwolf.conf )
2
+ install (FILES "${CMAKE_BINARY_DIR} /direwolf.conf" DESTINATION ~ )
3
+ endif ()
4
+
5
+ if (NOT EXISTS ~/sdr.conf )
6
+ install (FILES "${CUSTOM_CONF_DIR} /sdr.conf" DESTINATION ~ )
7
+ endif ()
8
+
9
+ if (NOT EXISTS ~/dw-start.sh )
10
+ install (FILES "${CUSTOM_SCRIPTS_DIR} /dw-start.sh" DESTINATION ~ )
11
+ endif ()
12
+
13
+ if (NOT EXISTS ~/telem-m0xer-3.txt )
14
+ install (FILES "${CUSTOM_TELEMETRY_DIR} /telem-m0xer-3.txt" DESTINATION ~ )
15
+ endif ()
16
+
17
+ if (NOT EXISTS ~/telem-balloon.conf )
18
+ install (FILES "${CUSTOM_TELEMETRY_DIR} /telem-balloon.conf" DESTINATION ~ )
19
+ endif ()
20
+
21
+ if (NOT EXISTS ~/telem-volts.conf )
22
+ install (FILES "${CUSTOM_TELEMETRY_DIR} /telem-volts.conf" DESTINATION ~ )
23
+ endif ()
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ set(SYMBOLSX_TXT_BKP "symbolsX.txt.old")
26
26
set (SYMBOLSX_URL "http://www.aprs.org/symbols/symbolsX.txt" )
27
27
set (CUSTOM_BINARY_DATA_DIR "${CMAKE_BINARY_DIR} /data" )
28
28
29
+ # we can also move to a separate cmake file and use file(download)
30
+ # see conf/install_conf.cmake as example
29
31
file (COPY "${CUSTOM_DATA_DIR} /${TOCALLS_TXT} " DESTINATION "${CUSTOM_BINARY_DATA_DIR} " )
30
32
file (COPY "${CUSTOM_DATA_DIR} /${SYMBOLS-NEW_TXT}" DESTINATION "${CUSTOM_BINARY_DATA_DIR} " )
31
33
file (COPY "${CUSTOM_DATA_DIR} /${SYMBOLSX_TXT} " DESTINATION "${CUSTOM_BINARY_DATA_DIR} " )
Original file line number Diff line number Diff line change 2
2
if (NOT WIN32 )
3
3
install (PROGRAMS "${CUSTOM_SCRIPTS_DIR} /dwespeak.sh" DESTINATION bin )
4
4
install (PROGRAMS "${CUSTOM_SCRIPTS_DIR} /dw-start.sh" DESTINATION share/doc/${CMAKE_PROJECT_NAME}/examples )
5
-
6
- add_custom_target (install -conf-scripts
7
- COMMAND ${CMAKE_COMMAND} -E copy "${CUSTOM_SCRIPTS_DIR} /dw-start.sh" ~
8
- )
9
-
10
5
add_subdirectory (telemetry-toolkit )
11
6
endif ()
Original file line number Diff line number Diff line change 1
- add_custom_target (install -conf-telemetry
2
- COMMAND ${CMAKE_COMMAND} -E copy "${CUSTOM_TELEMETRY_DIR} /telem-m0xer-3.txt" ~
3
- COMMAND ${CMAKE_COMMAND} -E copy "${CUSTOM_TELEMETRY_DIR} /telem-balloon.conf" ~
4
- COMMAND ${CMAKE_COMMAND} -E copy "${CUSTOM_TELEMETRY_DIR} /telem-volts.conf" ~
5
- )
6
-
7
1
install (PROGRAMS "${CUSTOM_TELEMETRY_DIR} /telem-balloon.pl" DESTINATION bin )
8
2
install (PROGRAMS "${CUSTOM_TELEMETRY_DIR} /telem-bits.pl" DESTINATION bin )
9
3
install (PROGRAMS "${CUSTOM_TELEMETRY_DIR} /telem-data.pl" DESTINATION bin )
Original file line number Diff line number Diff line change @@ -438,3 +438,18 @@ install(TARGETS kissutil DESTINATION bin)
438
438
if (UDEV_FOUND )
439
439
install (TARGETS cm108 DESTINATION bin )
440
440
endif ()
441
+
442
+
443
+
444
+ ## TESTS
445
+ # Note CMake will generate tests only if the enable_testing() command
446
+ # has been invoked. The CTest module invokes the command automatically
447
+ # when the BUILD_TESTING option is ON.
448
+ include (CTest )
449
+ if (BUILD_TESTING )
450
+ # add_test(NAME <name> COMMAND <command> [<arg>...]
451
+ # [CONFIGURATIONS <config>...]
452
+ # [WORKING_DIRECTORY <dir>])
453
+
454
+
455
+ endif ()
You can’t perform that action at this time.
0 commit comments