diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt index 91b9e41..6cdf1f2 100644 --- a/conf/CMakeLists.txt +++ b/conf/CMakeLists.txt @@ -39,7 +39,7 @@ install(FILES "${CUSTOM_CONF_DIR}/sdr.conf" DESTINATION share/doc/${CMAKE_PROJEC if(NOT WIN32) add_custom_target(install-conf COMMAND ${CMAKE_COMMAND} - -DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}" + -DCUSTOM_BINARY_DIR="${CMAKE_BINARY_DIR}" -DCUSTOM_CONF_DIR="${CUSTOM_CONF_DIR}" -DCUSTOM_SCRIPTS_DIR="${CUSTOM_SCRIPTS_DIR}" -DCUSTOM_TELEMETRY_DIR="${CUSTOM_TELEMETRY_DIR}" diff --git a/conf/install_conf.cmake b/conf/install_conf.cmake index 8abfe96..af111a7 100644 --- a/conf/install_conf.cmake +++ b/conf/install_conf.cmake @@ -1,23 +1,23 @@ -if(NOT EXISTS ~/direwolf.conf) - install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ~) +if(NOT EXISTS $ENV{HOME}/direwolf.conf) + configure_file("${CUSTOM_BINARY_DIR}/direwolf.conf" $ENV{HOME}) endif() -if(NOT EXISTS ~/sdr.conf) - install(FILES "${CUSTOM_CONF_DIR}/sdr.conf" DESTINATION ~) +if(NOT EXISTS $ENV{HOME}/sdr.conf) + configure_file("${CUSTOM_CONF_DIR}/sdr.conf" $ENV{HOME}) endif() -if(NOT EXISTS ~/dw-start.sh) - install(FILES "${CUSTOM_SCRIPTS_DIR}/dw-start.sh" DESTINATION ~) +if(NOT EXISTS $ENV{HOME}/dw-start.sh) + configure_file("${CUSTOM_SCRIPTS_DIR}/dw-start.sh" $ENV{HOME}) endif() -if(NOT EXISTS ~/telem-m0xer-3.txt) - install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-m0xer-3.txt" DESTINATION ~) +if(NOT EXISTS $ENV{HOME}/telem-m0xer-3.txt) + configure_file("${CUSTOM_TELEMETRY_DIR}/telem-m0xer-3.txt" $ENV{HOME}) endif() -if(NOT EXISTS ~/telem-balloon.conf) - install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-balloon.conf" DESTINATION ~) +if(NOT EXISTS $ENV{HOME}/telem-balloon.conf) + configure_file("${CUSTOM_TELEMETRY_DIR}/telem-balloon.conf" $ENV{HOME}) endif() -if(NOT EXISTS ~/telem-volts.conf) - install(FILES "${CUSTOM_TELEMETRY_DIR}/telem-volts.conf" DESTINATION ~) +if(NOT EXISTS $ENV{HOME}/telem-volts.conf) + configure_file("${CUSTOM_TELEMETRY_DIR}/telem-volts.conf" $ENV{HOME}) endif()