Skip to content

move to cmake, ctest, cpack to build direwolf #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Nov 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
ra1nb0w committed Nov 9, 2019
commit 184b2af3296d22db31b8b10e1ebc8c591304cce5
2 changes: 1 addition & 1 deletion conf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
24 changes: 12 additions & 12 deletions conf/install_conf.cmake
Original file line number Diff line number Diff line change
@@ -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()