diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-01-15 13:07:48 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-01-18 20:09:23 +0000 |
commit | 7abb10341b24bb5c139f8470f9456d97404562d2 (patch) | |
tree | 680366cf51c39d6b1eb0bedf9c204fc39bf5a596 /cmake | |
parent | 24954d6bdff0cd6c4abcaf9ed178ce6b65a9ba78 (diff) |
CMake: Copy data files to the run directory.
Set DATAFILE_DIR to a value that includes the build configuration. Add a
copy_data_files target that copies AUTHORS-SHORT, the default filters,
and other support files to the run directory. Add FindPowerShell.cmake
and require it on Windows. Remove some OS X BUNDLE_RESOURCE_
declarations which are now covered by copy_data_files.
Change-Id: Iade74946dd5ed2c54239036aa4970f9ffc4681a4
Reviewed-on: https://code.wireshark.org/review/6561
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindPowerShell.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/modules/FindPowerShell.cmake b/cmake/modules/FindPowerShell.cmake new file mode 100644 index 0000000000..a84039da3d --- /dev/null +++ b/cmake/modules/FindPowerShell.cmake @@ -0,0 +1,27 @@ +# +# Find PowerShell +# This module looks for PowerShell and sets the following: +# POWERSHELL_EXECUTABLE - Path to PowerShell. +# POWERSHELL_COMMAND - Command suitable for running .ps1 scripts +# +# To do: +# - Add a version check +# + +find_program(POWERSHELL_EXECUTABLE + NAMES powershell + DOC "PowerShell command" +) + +INCLUDE(FindPackageHandleStandardArgs) +find_package_handle_standard_args(POWERSHELL DEFAULT_MSG POWERSHELL_EXECUTABLE) + +set(_powershell_command "POWERSHELL_COMMAND-NOTFOUND") +if(POWERSHELL_FOUND) + set(_powershell_command "${POWERSHELL_EXECUTABLE}" -NoProfile -NonInteractive -executionpolicy bypass -File) +endif() +set(POWERSHELL_COMMAND ${_powershell_command} + CACHE STRING "Command suitable for running PowerShell scripts." +) + +mark_as_advanced(POWERSHELL_EXECUTABLE POWERSHELL_COMMAND) |