mirror of https://github.com/wb2osz/direwolf.git
cmake: change install-conf script with configure_file()
in this way, If the input file is modified the build system will re-run CMake to re-configure the file and generate the build system again.
This commit is contained in:
parent
0e5049c08a
commit
184b2af329
|
@ -39,7 +39,7 @@ install(FILES "${CUSTOM_CONF_DIR}/sdr.conf" DESTINATION share/doc/${CMAKE_PROJEC
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
add_custom_target(install-conf
|
add_custom_target(install-conf
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}"
|
-DCUSTOM_BINARY_DIR="${CMAKE_BINARY_DIR}"
|
||||||
-DCUSTOM_CONF_DIR="${CUSTOM_CONF_DIR}"
|
-DCUSTOM_CONF_DIR="${CUSTOM_CONF_DIR}"
|
||||||
-DCUSTOM_SCRIPTS_DIR="${CUSTOM_SCRIPTS_DIR}"
|
-DCUSTOM_SCRIPTS_DIR="${CUSTOM_SCRIPTS_DIR}"
|
||||||
-DCUSTOM_TELEMETRY_DIR="${CUSTOM_TELEMETRY_DIR}"
|
-DCUSTOM_TELEMETRY_DIR="${CUSTOM_TELEMETRY_DIR}"
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
if(NOT EXISTS ~/direwolf.conf)
|
if(NOT EXISTS $ENV{HOME}/direwolf.conf)
|
||||||
install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ~)
|
configure_file("${CUSTOM_BINARY_DIR}/direwolf.conf" $ENV{HOME})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT EXISTS ~/sdr.conf)
|
if(NOT EXISTS $ENV{HOME}/sdr.conf)
|
||||||
install(FILES "${CUSTOM_CONF_DIR}/sdr.conf" DESTINATION ~)
|
configure_file("${CUSTOM_CONF_DIR}/sdr.conf" $ENV{HOME})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT EXISTS ~/dw-start.sh)
|
if(NOT EXISTS $ENV{HOME}/dw-start.sh)
|
||||||
install(FILES "${CUSTOM_SCRIPTS_DIR}/dw-start.sh" DESTINATION ~)
|
configure_file("${CUSTOM_SCRIPTS_DIR}/dw-start.sh" $ENV{HOME})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT EXISTS ~/telem-m0xer-3.txt)
|
if(NOT EXISTS $ENV{HOME}/telem-m0xer-3.txt)
|
||||||
install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-m0xer-3.txt" DESTINATION ~)
|
configure_file("${CUSTOM_TELEMETRY_DIR}/telem-m0xer-3.txt" $ENV{HOME})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT EXISTS ~/telem-balloon.conf)
|
if(NOT EXISTS $ENV{HOME}/telem-balloon.conf)
|
||||||
install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-balloon.conf" DESTINATION ~)
|
configure_file("${CUSTOM_TELEMETRY_DIR}/telem-balloon.conf" $ENV{HOME})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT EXISTS ~/telem-volts.conf)
|
if(NOT EXISTS $ENV{HOME}/telem-volts.conf)
|
||||||
install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-volts.conf" DESTINATION ~)
|
configure_file("${CUSTOM_TELEMETRY_DIR}/telem-volts.conf" $ENV{HOME})
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue