diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-01-16 18:57:29 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-01-16 18:57:29 +0000 |
commit | 8db4bc2499a43afe57fca8589a43d7ee30cd1b86 (patch) | |
tree | b36159df3b1ce08563d637538a6d39e9d936aa4e /cmake | |
parent | 62249477b6b159e929ac4f94bf5e3c38c475636d (diff) | |
download | wireshark-8db4bc2499a43afe57fca8589a43d7ee30cd1b86.tar.gz wireshark-8db4bc2499a43afe57fca8589a43d7ee30cd1b86.tar.bz2 wireshark-8db4bc2499a43afe57fca8589a43d7ee30cd1b86.zip |
More Chocolatey lex/yacc updates.
Add Windows-style path handling to runlex.sh. Update the example
Chocolatey LEX path accordingly. This lets us use path information in
LEX and have it work in both nmake and runlex.sh
Add a FindChocolatey.cmake module. Update FindLEX and FindYACC to use it.
The code is currently untested and commented out.
svn path=/trunk/; revision=54828
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindChocolatey.cmake | 36 | ||||
-rw-r--r-- | cmake/modules/FindLEX.cmake | 8 | ||||
-rw-r--r-- | cmake/modules/FindYACC.cmake | 8 |
3 files changed, 52 insertions, 0 deletions
diff --git a/cmake/modules/FindChocolatey.cmake b/cmake/modules/FindChocolatey.cmake new file mode 100644 index 0000000000..d523ad6220 --- /dev/null +++ b/cmake/modules/FindChocolatey.cmake @@ -0,0 +1,36 @@ +# FindChocolatey +# ---------- +# +# this module looks for Cygwin + +# This code was copied from +# http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindCygwin.cmake;hb=HEAD +# and modified. +# +# Its toplevel COPYING file starts with: +#============================================================================= +# Copyright 2001-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +if (WIN32) + find_path(CHOCOLATEY_INSTALL_PATH + choco.bat + PATH "C:/Chocolatey" ENV ChocolateyInstall + PATH_SUFFIXES bin + DOC "Chocolatey installation path" + NO_DEFAULT_PATH + ) + + mark_as_advanced( + CHOCOLATEY_INSTALL_PATH + ) +endif () diff --git a/cmake/modules/FindLEX.cmake b/cmake/modules/FindLEX.cmake index 955ae3849a..6fce54e6aa 100644 --- a/cmake/modules/FindLEX.cmake +++ b/cmake/modules/FindLEX.cmake @@ -5,6 +5,12 @@ # INCLUDE(FindCygwin) +#INCLUDE(FindChocolatey) + +# Chocolatey's C:\Chocolatey\bin\win_flex and -\win_bison are +# currently unusable without some manual adjustments to the +# win_flex and win_bison wrapper scripts. Calling the executables +# directly should work. FIND_PROGRAM(LEX_EXECUTABLE NAMES @@ -12,6 +18,8 @@ FIND_PROGRAM(LEX_EXECUTABLE lex PATHS ${CYGWIN_INSTALL_PATH}/bin +# ${CHOCOLATEY_INSTALL_PATH}/bin +# ${CHOCOLATEY_INSTALL_PATH}/lib/winflexbison.2.4.1.20140103/tools /bin /usr/bin /usr/local/bin diff --git a/cmake/modules/FindYACC.cmake b/cmake/modules/FindYACC.cmake index f71650b036..0bbd287484 100644 --- a/cmake/modules/FindYACC.cmake +++ b/cmake/modules/FindYACC.cmake @@ -6,6 +6,12 @@ # INCLUDE(FindCygwin) +#INCLUDE(FindChocolatey) + +# Chocolatey's C:\Chocolatey\bin\win_flex and -\win_bison are +# currently unusable without some manual adjustments to the +# win_flex and win_bison wrapper scripts. Calling the executables +# directly should work. FIND_PROGRAM(YACC_EXECUTABLE NAMES @@ -13,6 +19,8 @@ FIND_PROGRAM(YACC_EXECUTABLE yacc PATHS ${CYGWIN_INSTALL_PATH}/bin +# ${CHOCOLATEY_INSTALL_PATH}/bin +# ${CHOCOLATEY_INSTALL_PATH}/lib/winflexbison.2.4.1.20140103/tools /bin /usr/bin /usr/local/bin |