1 ##Copyright (C) johnfettig.
4 ##Redistribution and use in source and binary forms, with or without modification,
5 ##are permitted provided that the following conditions are met:
7 ##* Redistributions of source code must retain the above copyright notice, this
8 ## list of conditions and the following disclaimer.
10 ##* Redistributions in binary form must reproduce the above copyright notice, this
11 ## list of conditions and the following disclaimer in the documentation and/or
12 ## other materials provided with the distribution.
14 ##THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ##ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 ##WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 ##DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
18 ##ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 ##(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 ##LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 ##ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 ##(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 ##SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 # CorrectWindowsPaths - this module defines one macro
27 # CONVERT_CYGWIN_PATH( PATH )
28 # This uses the command cygpath (provided by cygwin) to convert
29 # unix-style paths into paths useable by cmake on windows
31 macro (CONVERT_CYGWIN_PATH _path)
33 EXECUTE_PROCESS(COMMAND cygpath.exe -m ${${_path}}
34 OUTPUT_VARIABLE ${_path})
35 string (STRIP ${${_path}} ${_path})
37 endmacro (CONVERT_CYGWIN_PATH)