summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2017-06-17 09:42:14 +0200
committerPeter Wu <peter@lekensteyn.nl>2017-06-21 01:53:08 +0000
commit7e2c67eaf3d70f7a5b870afa4fb45a0e60e34608 (patch)
treef6a511543c5a8888bff05d96428e25383d95f49b /CMakeLists.txt
parent230c96a593fdb68b5c7caddf7ae3ac119b64b059 (diff)
downloadwireshark-7e2c67eaf3d70f7a5b870afa4fb45a0e60e34608.tar.gz
cmake: allow building from a UNC source directory
Make two minor adjustments to allow building on Windows when the source directory is specified in UNC notation (\\server\volume\directory) instead of mapping such a directory to a drive letter. Cmake's add_custom_command() calls "cd <work_dir>" if a working directory is define as part of the rule. However, cd \\server\volume\directory is not allowed. Modify the two occassions where the working directory is derived from CMAKE_SOURCE_DIR. For copying some install files, we can get away with using the absolute path for each source file to be copied. The perl script that creates the tap listing for lua does not depend on a working directory at all. We can simply remove the WORKING_DIRECTORY parameter. Change-Id: Iac8e0addc44650692c1263fdca11f68315f50c63 Reviewed-on: https://code.wireshark.org/review/22236 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b27af5d4b..9465845179 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1806,13 +1806,13 @@ if(WIN32)
endif()
foreach(_install_file ${INSTALL_FILES})
+ get_filename_component(_install_file_src "${_install_file}" ABSOLUTE)
get_filename_component(_install_basename "${_install_file}" NAME)
set(_output_file "${DATAFILE_DIR}/${_install_basename}")
add_custom_command(OUTPUT "${_output_file}"
COMMAND ${CMAKE_COMMAND} -E copy
- "${_install_file}"
+ "${_install_file_src}"
"${_output_file}"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS
docs
"${_install_file}"