aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-08-31 10:28:37 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-08-31 10:28:37 -0400
commitb0acd4e5705fc4c28d4a42cde86dae7a433a2f95 (patch)
tree2ce25d03d971abb40db416d5da1373ab07005bc5 /CMakeLists.txt
parentd258299bcb440e570e0c1d05538e05e259cff0bf (diff)
downloadmultihome-b0acd4e5705fc4c28d4a42cde86dae7a433a2f95.tar.gz
Bake in path to rsync a compile-time
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3de427f..af22806 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ include(CheckCSourceCompiles)
set(CMAKE_C_STANDARD 99)
-include_directories(.)
+include_directories("${CMAKE_CURRENT_BINARY_DIR}")
check_symbol_exists(basename "libgen.h" HAVE_BASENAME)
check_symbol_exists(dirname "libgen.h" HAVE_DIRNAME)
@@ -16,20 +16,20 @@ check_c_source_compiles(
"
#include <argp.h>
int main(int argc, char *argv[]) {
- struct argp_option option[10];
+ struct argp_option option[1];
}
"
HAVE_ARGP
)
-if (NOT HAVE_ARGP)
- message(FATAL_ERROR "Your toolchain does not provide argp")
-endif()
-find_program(PROGRAM_RSYNC rsync REQUIRED)
+find_program(RSYNC_BIN
+ NAMES rsync
+ REQUIRED)
+
+configure_file("config.h.in" "config.h" @ONLY)
add_executable(multihome
- multihome.c
- multihome.h)
+ multihome.c)
install(TARGETS multihome
- RUNTIME DESTINATION bin) \ No newline at end of file
+ RUNTIME DESTINATION bin)