diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c49bfa..9edb081 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,8 @@ include(CheckSymbolExists) include(CheckCSourceCompiles) set(CMAKE_C_STANDARD 99) +set(DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}) +set(MULTIHOME_SCRIPTS_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/init) include_directories("${CMAKE_CURRENT_BINARY_DIR}") @@ -11,6 +13,9 @@ check_symbol_exists(basename "libgen.h" HAVE_BASENAME) check_symbol_exists(dirname "libgen.h" HAVE_DIRNAME) check_symbol_exists(getpwuid "pwd.h" HAVE_GETPWUID) check_symbol_exists(geteuid "unistd.h" HAVE_GETEUID) +check_symbol_exists(strstr "string.h" HAVE_STRSTR) +check_symbol_exists(sprintf "string.h" HAVE_SPRINTF) +check_symbol_exists(PATH_MAX "limits.h" HAVE_PATH_MAX) check_c_source_compiles( " @@ -22,7 +27,7 @@ check_c_source_compiles( HAVE_ARGP ) -find_program(RSYNC_BIN +find_program(MULTIHOME_RSYNC_BIN NAMES rsync REQUIRED) @@ -34,3 +39,6 @@ add_executable(multihome install(TARGETS multihome RUNTIME DESTINATION bin) + +install(DIRECTORY init + DESTINATION ${DATA_DIR}) |