summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-17 23:37:55 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-17 23:37:55 +0000
commit3d26fcea33359da4f0e684255948d67cbecb5064 (patch)
treecb95fe53184226b2c78aa1329df957fd2f65ef76 /infrastructure
parenta5c185b6be6587a08c8620c0e5c9060546707a1e (diff)
Fix PERL_EXECUTABLE to be a native path, so that system() works.
Diffstat (limited to 'infrastructure')
-rw-r--r--infrastructure/cmake/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/infrastructure/cmake/CMakeLists.txt b/infrastructure/cmake/CMakeLists.txt
index 335d44e6..f55f7be2 100644
--- a/infrastructure/cmake/CMakeLists.txt
+++ b/infrastructure/cmake/CMakeLists.txt
@@ -4,6 +4,14 @@ enable_testing()
set(base_dir ${CMAKE_SOURCE_DIR}/../..)
+macro(cmake_to_native_path cmake_path native_path)
+ if(WIN32)
+ string(REPLACE "/" "\\" ${native_path} "${cmake_path}")
+ else()
+ set(${native_path} "${cmake_path}")
+ endif()
+endmacro()
+
set(files_to_configure
infrastructure/BoxPlatform.pm
contrib/mac_osx/org.boxbackup.bbackupd.plist
@@ -272,4 +280,5 @@ find_library(pcred_lib_path pcred ${base_dir}/../pcre-win32/lib)
target_link_libraries(lib_common PUBLIC "${pcreposixd_lib_path}" "${pcred_lib_path}")
# Define the location of the Perl executable, needed by testbackupstorefix
-target_compile_definitions(test_backupstorefix PRIVATE -DPERL_EXECUTABLE="${PERL_EXECUTABLE}")
+cmake_to_native_path(PERL_EXECUTABLE perl_executable_native)
+target_compile_definitions(test_backupstorefix PRIVATE -DPERL_EXECUTABLE="${perl_executable_native}")